Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Ajax and JS don't get along?

  1. #1
    Join Date
    Jul 2007
    Posts
    40
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default Ajax and JS don't get along?

    1) Script Title:
    Dynamic Ajax Content
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm
    3) Describe problem:

    I have this js text generator:

    http://tivaelydoc.110mb.com/java4.html

    I want it to load in the main content window of this layout (first test button):

    http://tivaelydoc.110mb.com/BI6.html

    I even trying loading the js separately, which is the second test button, using this:

    http://tivaelydoc.110mb.com/feature.js

    but it still didn't work. How come?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Please update the sentence generator to the most recent code I posted.
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    tivaelydoc (12-30-2008)

  4. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You need to remove:

    Code:
    <script type="text/javascript">
    and:

    Code:
    </script>
    from the feature.js file.

    There could also be other problems. However, since you will be using the script anyway, no need to load it. Just put it on the 'top' page (BI6.html).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    tivaelydoc (12-30-2008)

  6. #4
    Join Date
    Jul 2007
    Posts
    40
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I updated it. Do you know how I would get rid of the spelling correction underlines?

    http://tivaelydoc.110mb.com/BI6.html

    Look at Macey.

    I know it's a browser feature, but it doesn't show up in the original link:

    http://tivaelydoc.110mb.com/java4.html

    Can I PM someone my website to look at? I'm having trouble loading js files.
    Last edited by tivaelydoc; 12-30-2008 at 12:57 PM.

  7. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I cannot see anything that immediately differentiates the two textareas as served. I'm more surprised that spell check is off in the stand alone version than by the fact that it is on in the imported one. The correct spelling (according to the browser's dictionary) could be used though:

    MACY
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yes, or you could switch that textarea to a div.
    Jeremy | jfein.net

  9. #7
    Join Date
    Jul 2007
    Posts
    40
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    What would I have to do to switch it to a div?

  10. #8
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change:
    Code:
    <textarea id="text" name="text" style="background:black;width:100%;height:150px;font-size:2em;font-family:garamond;color:#990000;text-transform: uppercase;"></textarea>
    To:
    Code:
    <div id="text" name="text" style="background:black;width:100%;height:150px;font-size:2em;font-family:garamond;color:#990000;text-transform: uppercase;"></div>
    And switch:
    Code:
    el = document.getElementById(el).value = random;
    To:
    Code:
    el = document.getElementById(el).firstChild.nodeValue = random;
    Jeremy | jfein.net

  11. #9
    Join Date
    Jul 2007
    Posts
    40
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Here is the link:

    http://tivaelydoc.110mb.com/BI8.html

    Flash works, but comments don't show up if you click on it twice. The words don't sort, but the main link works. And the HTML generator doesn't work period.

  12. #10
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I don't see where you calling the function...
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •