SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    jQuery, I think I'm losing script tags with AJAX.

    Hi all,
    Actually I'm not sure what is happening.
    I have a gallery page here,
    http://prestomarine.com/models/sdfsd...m-Gallery4.php
    Jquery is creating the modal box and I'm using my own AJAX script and gallery script.

    I want to use the link "this doesnt work, it should let the java script call "startss" function when page is loaded" that is displayed in the modal box.
    This link sets the mode of the gallery (php) script to go into slideshow mode (it then dispays stop slideshow) BUT I have alerts in the gallery script that don't work, It's like anything javaSript is removed from the gallery script.
    The other link will fire off a one shot delayed slide change from an onClick event so I know the code is working.

    I set up a test link to directly view the gallery php page in slideshow mode, just click the change button. This is not meant to be functional but you can view the source for the slideshow mode.
    http://prestomarine.com/z-gal.php
    Notice it says, stop slideshow and you will get a number of alerts that just don't happen when you click the link that should start the slideshow (this doesn't work ...).

    If you view the source on the gallery page, you can see everything I am doing to get an alert and call functions and it works when called directly but refuses to do anything within the modalbox.

    In the modal box, as soon as you click the link that says this doesn't work ...., there should be popup alerts.

    I have spent two days on this and it's driving me wonky.

    I did find some information that jQuery strips out script tags so to outsmart jQuery I replaced all occurrences of script (lower case) to scrript but that didn't help.

    Also in the gallery script I have <SCRIPT type="text/javascript" src="../../z-galhelper.php"></SCRIPT> and my apache logs do not show it being loaded or any error.

    If anyone would be so kind as to look and offer suggestions, it would be greatly appreciated.
    What I lack in acuracy I make up for in misteaks

  2. #2
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by lorenw View Post
    Hi all,
    Actually I'm not sure what is happening.
    I think I know what is happening, all I'm doing is changing the contents of a div so technically nothing gets loaded per se.
    I had a similar gallery using the original modalbox and everything worked as it should. Somehow that did a page load got on every request.

    Here is an example of the modal box that does give the alert each time the slideshow gets loaded.
    http://h/cmsdemo2/z-mikael2/models/xl500/
    What I lack in acuracy I make up for in misteaks

  3. #3
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,104
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I have stripped everything back to bare bones. very compact and simple to see what is going on.
    http://prestomarine.com/models/sdfsdf/index2.php

    I am getting no alerts when the modal box gets loaded so this has nothing to do with jQuery or anything else I have suspected.

    This is as simple as it gets but I know that AJAX loaded pages can throw alerts because it does here.
    http://prestomarine.com/models/xl500/ under the gallery tab.

    This one uses prototype.js for the AJAX requests and I don't understand what they are doing differently than what I'm trying to do.
    here is a link to my prototype.js http://prestomarine.com/b-css/prototype.js

    I think I'm on to something but don't know what it is
    What I lack in acuracy I make up for in misteaks


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
  •