Problem with Javascript and proberly IE7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rick2000nl
    New Member
    • Jul 2007
    • 2

    Problem with Javascript and proberly IE7

    Hello,

    I have a problem with a routine i used for a couple of years, without any problems. Just a few weeks ago people started to say they cant enter the code.
    On my work i testted it and indeed it didn't worked anymore. but at home it works..

    The problem start when you click on the button it gives a error, and displays null.html

    The site is www.rvellinga.n l and wil be accessed by "klantcode" wich will be follewd by the button....

    I think its has to do with IE 7 but i am no programmer..

    And for test purpose i have made a page with a code geheim (small captions)


    For your info i pasted trhe code herin...
    And yes, there is a page wich the code will load.

    Please can somebody help me??

    Ricardo








    first part :
    <script language="JavaS cript">
    <!--
    function SymError()
    {
    return true;
    }
    window.onerror = SymError;
    var SymRealWinOpen = window.open;
    function SymWinOpen(url, name, attributes)
    {
    return (new Object());
    }
    window.open = SymWinOpen;
    //-->
    </script>
    <script language="JavaS cript" type="text/JavaScript">
    <!--
    function MM_reloadPage(i nit) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Net scape")&&(parse Int(appVersion) ==4)) {
    document.MM_pgW =innerWidth; document.MM_pgH =innerHeight; onresize=MM_rel oadPage; }}
    else if (innerWidth!=do cument.MM_pgW || innerHeight!=do cument.MM_pgH) location.reload ();
    }
    MM_reloadPage(t rue);
    //-->
    </script>
    <SCRIPT LANGUAGE="JavaS cript">
    function wachtwoord()
    {
    var geheim = prompt("Wachtwo ord:","");
    location.href = geheim + ".html";
    }
    </script>



    second part
    Klanten........ text......

    <FORM>
    <INPUT TYPE="button" VALUE="Klantcod e" onClick="wachtw oord()">
    </FORM>
    <p>&nbsp;</p>
    </BODY>
    <script language="JavaS cript">
    <!--
    window.open = SymRealWinOpen;
    //-->
    </script>
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    Has any debugging been done...?

    You aren't very clear as to *what* is the actual error.

    Comment

    • Rick2000nl
      New Member
      • Jul 2007
      • 2

      #3
      On my site www.rvellinga.n l is a link called "klantcode"

      When you press it it wil show a second window with a button.
      In old browsers it will function as programmed, you click the button and the you get a input field where you can enter a code "example geheim"
      Then it will load page geheim.html ...

      In (what i think happens only in IE7) it will open the second page wich has the button, but when you click on it it shows inmideatly the page "null.html" .

      You cant enter anything because it seems it skipped the input field.

      Sorry for my english, but i hope that some one can help me...

      Regards

      Rick

      Comment

      • Romulo NF
        New Member
        • Nov 2006
        • 54

        #4
        Code:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        
        <html>
        <head>
        	<title>Untitled</title>
        </head>
        
        <script>
        
        function enterCode() {
        var popup = window.open('','Popup','height=100,width=340,top=350,left=300,toolbar=no')
        
        popupBody = popup.document.getElementsByTagName("body")[0]
        
        inputText = popup.document.createElement("input")
        inputText.type = "text"
        popupBody.appendChild(inputText)
        
        inputButton = popup.document.createElement("input")
        inputButton.type = "button"
        inputButton.value = "OK"
        inputButton.onclick = this.parent.changeLocation
        popupBody.appendChild(inputButton)
        
        }
        
        function changeLocation() {
        value = inputText.value
        self.location.href = "http://" + value + ".htm"
        }
        </script>
        
        <body>
        
        <a href="javascript:enterCode()">klantcode</a>
        
        </body>
        </html>
        Try something like this
        Hope that help you

        Good luck

        Comment

        Working...