Web Analytics Made Easy -
StatCounter JavaScript Popup help - CodingForum

Announcement

Collapse
No announcement yet.

JavaScript Popup help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaScript Popup help

    I need a similar code like this but instead of having the link open up that one url “thankyou.htm” I want to be able to specify a different html page for it to open up with the same values.

    So it would be something like.. <a href="java scriptpenpopup(somepage.htm)">
    <a href="java scriptpenpopup(otherpage.htm)">

    Etc and so on you get the idea? Does anyone have a script like this that you can post please?

    The bottom script is just an example. Does anyone have a script similar to this or something?

    Basically I want to use a script like this but for me to be able to use it on multiple links and not just the one that the script specifies.



    <script>

    //Popup Window Script
    //By JavaScript Kit (http://javascriptkit.com)
    //JavaScript tutorials and over 400+ free scripts

    function openpopup(){
    var popurl="thankyou.htm"
    winpops=window.open(popurl,"","width=400,height=338,scrollbars,")
    }

    </script>

    <a href="java scriptpenpopup()">Click here to open window</a>

    Last edited by b1ing; Feb 14, 2004, 08:59 PM.

  • #2
    Code:
    <script type="text/javascript">
    function openWin(url){
    window.open([color=red]url[/color], "", "width=400,height=338,scrollbars");
    }
    </script>
    ...
    <a href="[color=red]page.html[/color]" onclick="openWin([color=red]href[/color]); [color=red]return false;[/color]">Open window.</a>

    Comment


    • #3
      Thank you works great, just what I needed.
      Last edited by b1ing; Feb 14, 2004, 10:14 PM.

      Comment


      • #4
        You're welcome.

        Comment

        Working...
        X