| | |
using dynamic querystrings with js
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2007
Posts: 5
Reputation:
Solved Threads: 0
Hi,
i have a page with pictures on it, when a user clicks on a picture 2 things happen at the same time a new window pops up and a function is called.
the function does a few checks then calls another page when it calls this page i want to use a querystring, but i want to send data from a database.
i understand js is client side so how do i use server data with it?
the only way i could think of doing this was to put the data needed into a var then use the code below to call the function and pass on the var
then once the function has received the var it can use it to open the page with the querystring
this doesnt work for me ami doing something wrong or am i way of track if anyone couldpoint me in the right direction would be really helpful
i have a page with pictures on it, when a user clicks on a picture 2 things happen at the same time a new window pops up and a function is called.
the function does a few checks then calls another page when it calls this page i want to use a querystring, but i want to send data from a database.
i understand js is client side so how do i use server data with it?
the only way i could think of doing this was to put the data needed into a var then use the code below to call the function and pass on the var
ASP Syntax (Toggle Plain Text)
<a href="http://www.someurl.com" onclick="openwin(testvar)" target="_blank"> <img src=<a rel="nofollow" class="t" href="http://www.pic.com/pic.jpg" target="_blank">http://www.pic.com/pic.jpg</a> width="125" height="125" alt="some picture" border="0"/></a>
then once the function has received the var it can use it to open the page with the querystring
ASP Syntax (Toggle Plain Text)
function openwin(testvar){ if(popUpsBlocked) window.location.replace("sorrypop.asp"); else window.open("tmp.asp?var="+testvar); }
this doesnt work for me ami doing something wrong or am i way of track if anyone couldpoint me in the right direction would be really helpful
![]() |
Similar Threads
- Dynamic pull out menus (JavaScript / DHTML / AJAX)
- Creating dynamic array structures (C++)
- Dynamic web pages? Which will exist? (IT Professionals' Lounge)
- dynamic IP's and Websites (Domains and DNS)
- Core PHP Programming to Build Dynamic Websites (PHP)
- Google Trends (Search Engine Optimization)
- Dynamic Drive Overlay Win98 80 gig support (Windows 95 / 98 / Me)
Other Threads in the ASP Forum
- Previous Thread: what exactly is a webhosting company?
- Next Thread: ASP on a stand alone 2k machine
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit web webserver windows7





