473,325 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Passing paramiter to new window & use of it

I am trying to open a pop-up window with its own htm code, in order to show
an enlargement of a thumbnail. But I am passing a query string after the? in
the url of the new window. for example:
www.helpme.com?newpic.jpg
I am then trying to put the query string in
<IMG SRC="querystring" WIDTH=400 BORDER=0>.
I don't know how to get the query string to echo "newpic.jpg" in the htm
command in the pop up window.

Thank You.

Paul
Jul 20 '05 #1
4 1483
Maybe something like:

<script language="JavaScript">
<!--
document.write('<IMG SRC="' + document.location.search + '" WIDTH=400
BORDER=0>');
// -->
</script>

- Tom Kiefer
thogek @ earthlink . net
"P.L. Owens" <pl*****@uniquedesignsuite.com> wrote in message
news:10*************@corp.supernews.com...
I am trying to open a pop-up window with its own htm code, in order to show an enlargement of a thumbnail. But I am passing a query string after the? in the url of the new window. for example:
www.helpme.com?newpic.jpg
I am then trying to put the query string in
<IMG SRC="querystring" WIDTH=400 BORDER=0>.
I don't know how to get the query string to echo "newpic.jpg" in the htm
command in the pop up window.

Jul 20 '05 #2
Thanks but this still does not seem to be picking up the parameter.

"Tom Kiefer" <th*******@earthlinknot.net> wrote in message
news:MC*******************@newsread2.news.pas.eart hlink.net...
Maybe something like:

<script language="JavaScript">
<!--
document.write('<IMG SRC="' + document.location.search + '" WIDTH=400
BORDER=0>');
// -->
</script>

- Tom Kiefer
thogek @ earthlink . net
"P.L. Owens" <pl*****@uniquedesignsuite.com> wrote in message
news:10*************@corp.supernews.com...
I am trying to open a pop-up window with its own htm code, in order to show
an enlargement of a thumbnail. But I am passing a query string after

the? in
the url of the new window. for example:
www.helpme.com?newpic.jpg
I am then trying to put the query string in
<IMG SRC="querystring" WIDTH=400 BORDER=0>.
I don't know how to get the query string to echo "newpic.jpg" in the htm
command in the pop up window.


Jul 20 '05 #3
P.L. Owens wrote:
I am trying to open a pop-up window with its own htm code, in order to show
an enlargement of a thumbnail. But I am passing a query string after the? in
the url of the new window. for example:
www.helpme.com?newpic.jpg
I am then trying to put the query string in
<IMG SRC="querystring" WIDTH=400 BORDER=0>.
I don't know how to get the query string to echo "newpic.jpg" in the htm
command in the pop up window.


code excerpt:

var re_url = new RegExp('datetime=(\\-?\\d+)');
var datCurrent = (re_url.exec(String(window.location)) ? new Date(new
Number(RegExp.$1)) : new Date());

This takes a date from the url, where it is passed with '?datetime=<date>'

I haven't studied the working of it, but maybe this helps you further.
--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Jul 20 '05 #4
On Sat, 7 Feb 2004 17:11:58 -0800, P.L. Owens <no****@nospam.com> wrote:

[Fixed top-post and snipped]
"Tom Kiefer" <th*******@earthlinknot.net> wrote in message
news:MC*******************@newsread2.news.pas.eart hlink.net...
Maybe something like:

<script language="JavaScript">
Don't use the language attribute - it is deprecated. However, the type
attribute is required and is sufficient.

<script type="text/javascript">
<!--
Don't use SGML comments in SCRIPT sections. The archaic reasons for using
them are no longer valid.
document.write('<IMG SRC="' + document.location.search + '" WIDTH=400
BORDER=0>');
// -->
As above.
</script>

[snip]
Thanks but this still does not seem to be picking up the parameter.


For two reasons:

1) The document object doesn't have a location property, and
2) Even if it did, the resulting URL would have a question mark as its
first character.

Instead, try

document.write('<img src="' + window.location.search.substr(1) + '">');

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Raju V.K | last post by:
I am developing a web site which requires a set og unique values be transferred between pages and server many times. There fore i decided to put the values in an array so that only one reference to...
3
by: Edwin Boersma | last post by:
Hi, I've just installed Netscape 7.1 for Linux and the following script refuses to open a window when I call this function: function OpenLinkWindow() { ...
1
by: ILLOGIC | last post by:
Hello, i am beginner in c++. I hope tobe sufficiently clear and that someone could help me on this topic. For example i have template function <typename T> T sin_func(T & x){return sin(x);} ...
4
by: JR | last post by:
Hey all, I am passing a two dimensional array to a function. It basically looks like this int test(double array2 , const CONST1, const CONST2) { int returnValue; for (int i = 0;...
18
by: Wladimir Borsov | last post by:
Inside a html page (more precicesly inside a JSP page) I defined a button. When the user clicks this button a second browser window should pop up und load the passed URL. I coded <img...
6
by: vncntj | last post by:
I have this home.js file and I'm trying to collect the values on the other at "emplist.aspx" function poponload() { testwindow= window.open ("emplist.aspx", "mywindow",...
3
by: jodleren | last post by:
Hi Pretty simple, I am sure. I have a small JS script, which is function OpenSomething(input) { win3=window.open("some_file.php?info=" +...
5
by: aelred | last post by:
I have a web page where a member can open up a chat window (child window) with another member. - From there the member can also navigate to other web pages. - From other pages in the site, they...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.