Results 1 to 4 of 4

Thread: javascript - opening a page with parameters

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    javascript - opening a page with parameters

    I have a javscript function which opens a url....The only thing is I need it to open pages with parameters, and I'm not sure how to do it:

    Code:
    <html>
    <head>
    <title>LinkOpener</title>
    <script language="JavaScript">
    <!-- 
    
    function SearchTest(url, args)
    {
    	// if args is null, do the following
    	window.open(url,'win1','width=600,height=700, status, toolbar, menubar, scrollbars, resizable')
    	// else
    	// implement your code
    }
    
    // -->
    </script>
    
    <body>
    <h3>Search Test:</h3>
    <a href="#wf" onClick="JavaScript:SearchTest('http://www.msn.com','')">GET request</a>
    <br>
    <a href="#wf" onClick="JavaScript:SearchTest('http://www.ntis.gov/search/results.asp?loc=3-0-0&search=','frm_qry_Category=ALL&frm_qry_Search=earth&frm_qry_Search=AND&frm_qry_Search=&frm_qry_Search=AND&frm_qry_Search=&frm_qry_Year=1990&frm_qry_MaxRec=100&frm_qry_Rank=1')">POST request</a>
    
    </body>
    </html>
    If you can point me in the right direction or help me out in any way, I would really appreciate it.

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    In front of this pc.
    Posts
    580

    Re: javascript - opening a page with parameters

    I'm not clear on what you mean by paramaters...Are you talking about the window size and whether or not it displays toolbars, etc?

    Anyway, http://javascript.internet.com will probably have some code to do what you want.

  3. #3

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: javascript - opening a page with parameters

    I was talking about the post data for parameters, but I think I found away to do it: xmlhttp object or something like that. Whatever it is it works.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: javascript - opening a page with parameters

    Pass them in the querystring?

Posting Permissions

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



Click Here to Expand Forum to Full Width