Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS not working in Safari, IE 5.2, more?

    Hi All,

    I have some code below and was just wondering if it appeared that would cause this script to NOT be cross-browser. The known issues (I'm sure there are more) are IE 5.2 and Safari 1.02 on Mac OS X. The script is in two parts and uses three pages. The purpose being to add various items to an offsite shopping cart application that only takes individual URLs, but my requirements may make it necesary to purchase several items from one form. This DOES work in Netscape 7.1, IE 5.5/6. What am I missing? Thanks DOM/JS experts!

    Pages: Frameset, Main Page (with Form), Invisible Page (for opening various URLs passed from the main page form)
    Scripts: openURLs() - opens various URLs in Invisible Page from parameters passed from, goShop() - passes multiple URLs to array in Frameset Variables.

    ----- Start Frame Page -----
    <script language="JavaScript">
    var loadedPage="0";
    var loc = new Array();
    var messageShown="false";
    var onlineBuy="false";
    function openUrls() {
    if(loadedPage<loc.length) {
    parent.buyWindow.location=loc[loadedPage];
    loadedPage++;
    }
    if(loadedPage==loc.length && loc.length>0 && loadedPage>0 && messageShown=="false" && onlineBuy=="true"){
    alert("Going to Secure Shopping Cart");
    window.open("https://www.example.com/buyURL");
    parent.mainWindow.checkoutLink.innerHTML="Checkout to Secure Shopping Cart";
    messageShown="true";
    }
    }
    </script>

    <frameset rows="0,*">

    <frame src="buy.html" name="buyWindow" onLoad="parent.openUrls()" NORESIZE>
    <frame src="registration.php?cf=2" name="mainWindow">

    </frameset>
    ----- End Frame Page -----

    ----- Start Main page (w/ Form) -----
    <script language="JavaScript" type="text/JavaScript">
    function goShop(){

    alert("The Secure Payment Service is processing. Please wait for the confirmation message. Thank you for your patience");

    parent.loc = new Array("https://www.example.com/buyURL/buy.jsp?upc=Member&qty=1","https://www.example.com/buyURL/buy.jsp?upc=A&qty=1","https://www.example.com/buyURL/buy.jsp?upc=B&qty=1","https://www.example.com/buyURLbuy/buy.jsp?upc=C&qty=1");

    parent.onlineBuy = "true";**************************************************************** parent.buyWindow.location.reload();
    }
    </script>
    ----- End Main Page -----

    Any ideas or help as to why this isn't functioning in some browsers is helpful....works on some, not on others. name of the game right? I can provide more information if necesary...works perfect on the browsers mentioned above though. Many, many, many thanks!

  • #2
    Rex
    Rex is offline
    New Coder
    Join Date
    May 2004
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello Dr Smart Man -

    Is that... everything? You have no <html> or <head> tags whatsoever? I think you really should have.

    - Rex
    Sincerely,
    Rex


  •  

    Posting Permissions

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