CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 How do you pass URL parameters within javascript?

Print topic Send  topic

Author Message
George L.
Posted: 07/25/2002, 7:04 AM

Software: CodeCharge Studio 1.0.7
Language: PHP

I am asking a question regarding the following scenario.

Question: Does anyone know of a way to bring up a new window using say, a popup javascript function or something, that also transfers URL parameters to then new popup window.

Scenario: You have a Grid page and want to bring up a detail page of a particular record. You have a Detail Link on the row. When clicking on the link, it brings up a small popup window showing the detail page.

NOTE: I know how to create javascript to create the popup. I just don't know how to pass parameters to the popup page using the javascript.

Here is my javascript:
<script>

function PopUp(){
doPopUpWindow = window.open("/test.php?id={uid}","Test","");
}

</script>
Alex Alexapolsky
Posted: 07/26/2002, 4:01 AM

Try in Page/After Initialize event

Tpl.Variable("uid") = some_variable
Ron Borkent
Posted: 07/26/2002, 4:19 AM

How about:

<script langueage="JavaScript">

function PopUp(){
doPopUpWindow = window.open("/test.php?id="+ document.all["id"].value,"Test","");
}

</script>
just put the id in a hidden field in your grid and call it id.
Now when the window is opened the url will contain the id value after =

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.