473,472 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

using variable in path

If I have done this:

<script language="javascript">
var large="/graphics/00000001/main.jpg";
</script>
How would I write the MM_openBrWindow to use that variable?

So normally it is like this:

<a href="javascript:;" onClick="MM_openBrWindow
('imagepath','large','scrollbars=yes,resizable=yes ,width=540,height=540')">
View Large Image</a>

Where 'imagepath' is a hardcoded path. How can I write it to interpret and
use the variable "large" I defined above? Thank you
Jun 19 '07 #1
2 3810
On Jun 19, 11:52 pm, Cortney <Cort...@nospam.comwrote:
If I have done this:

<script language="javascript">
var large="/graphics/00000001/main.jpg";
</script>

How would I write the MM_openBrWindow to use that variable?

So normally it is like this:

<a href="javascript:;" onClick="MM_openBrWindow
('imagepath','large','scrollbars=yes,resizable=yes ,width=540,height=540')">
View Large Image</a>

Where 'imagepath' is a hardcoded path. How can I write it to interpret and
use the variable "large" I defined above? Thank you
I guess just without single quotes?

Jun 19 '07 #2
Darko wrote:
On Jun 19, 11:52 pm, Cortney <Cort...@nospam.comwrote:
>If I have done this:

<script language="javascript">
var large="/graphics/00000001/main.jpg";
</script>

How would I write the MM_openBrWindow to use that variable?
It depends. You haven't shown the function definition for MM_openBrWindow.
>So normally it is like this:

<a href="javascript:;" onClick="MM_openBrWindow
('imagepath','large','scrollbars=yes,resizable=ye s,width=540,height=540')">
View Large Image</a>

Where 'imagepath' is a hardcoded path. How can I write it to interpret and
use the variable "large" I defined above? Thank you
Assuming it works as you previously said, I take it, it combines
"imagepath" and "large." Therefore, make sure imagepath plus your
"large" variable equal what you require. And then of course, unquote
"large."

Also, don't use the "javascript:" pseudo-protocol in links.

http://jibbering.com/faq/#FAQ4_24

Make it a valid link to a page that notifies the user JavaScript was
required for the previous action, that is why they are at the new page.
I guess just without single quotes?
Why guess?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Jun 20 '07 #3

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

Similar topics

12
by: Bill | last post by:
For my personal use I am accessing a railway timetable page, parsing its contents and then sending brief relevant information as the subject line of an email to be read on a mobile phone. The...
1
by: Erick Bodine | last post by:
I am trying to set a new environment variable on a W2k machine with only partial success. The name("SSID") and value("ASIM") show up correctly in the registry and when I go to "System...
6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
6
by: Garfield | last post by:
We have written a small function to append a couple of paths to the path environmental variable. The code is: string PathValue = ""; string sAdd = ""; sAdd = ";" + <path1> + "Bin;" +...
5
by: Claire | last post by:
How do I use the TempFileCollection class please? The m/s halp files say i can use it to generate temp files but looking through the help files, i can't actually see an obvious method that does...
10
by: mirandacascade | last post by:
O/S: Win2K Vsn of Python:2.4 Based on a search of other posts in this group, it appears as though os.environ is one way to obtain the PATH environment variable. My questions: 1) is it...
1
by: Debs | last post by:
Hi, I am running my website using Weblogic, so the path is something like http://<myip>:<port>/<servername>/ On JSP pages I can use <%=request.getContextPath()%to get the root path of the...
4
by: Jean-François Michaud | last post by:
Hello, I've been looking at this for a bit now and I don't see what's wrong with the code. Can anybody see a problem with this? Here is an XSLT snippet I use. <xsl:template match="graphic">...
4
by: Stephen Cattaneo | last post by:
Hello all, I am attempting to execute an automated test (written in Python) via cron. I have to check the HOSTNAME variable as part of the test, oddly under cron the HOSTNAME environment...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.