473,387 Members | 1,573 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,387 software developers and data experts.

How do I use a speedscript variable in an html <a href= tag?

I have an existing website using Speedscript which is like Progress code. I have to put the includes and variables in the speedscript but need to do an
<a href="WI_testweb/"+variable+".xml">Matrix</a>

the variable value should be our customers number which will be the name of the .xml spreadsheet.

I appreciate any and all help.

thanks,
Aug 23 '10 #1
5 2587
johny10151981
1,059 1GB
Where are you getting the variable? you said customer number. where you want to add at server side or at client side. I think you need to add variable at server side. in that case it is needed to ask what server side scripting you are using. If the variable in client side then need to know what how user using choosing? i mean from what type of control.

In maximum case you can just do this with javascript
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function choice()
  3. {
  4.  var variable=document.getElementById("id_of_your_control"). value;
  5. document.getElementById("anchor").href="WI_testweb/"+variable+".xml";
  6. </script>
  7. <a id="anchor" href="">Matrix</a>
  8.  
Aug 24 '10 #2
This is all being done on the server side. I will give this code a try. Thanks,
Aug 24 '10 #3
The code I have to work with is........

<SCRIPT LANGUAGE="SpeedScript">

{shared/esalesvars.i}
{shared/validate-session.i}

</SCRIPT>

<SCRIPT LANGUAGE="javascript">

function choice()
{
var variable=login.getElementById("cLogin"). value;
document.getElementById("anchor").href="/WI_testweb/"+login+".xml";
</script>
<a id="anchor" href="">Matrix</a>

I am working on the server side and the speedscript above are the include files. We do not own the code so I can't look at the include files. Flying blind. The cLogin is from one of the include files it should contain the customers number.

I am trying to pull the cLogin and display a link on the screen that the specific customer can click on and pull up an Excel spreadsheet.

Any help will be greatly appreciated.

Thanks,
Aug 24 '10 #4
johny10151981
1,059 1GB
Javascript is a client side scripting language. What ever you trying to do must have to be on client not server.

Now in this point I am totally confused about what you need
Aug 27 '10 #5
Like I said I am very very new to this and have been thrown into the fire. However I have been able to get the code to work and do what I need it to do. Thank you for your help.
Aug 30 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Sorby | last post by:
Hi I've been coding in PHP for a little while now and was starting to feel pretty confident but then realise I need to understand regular expressions to solve a particular problem I've got ......
3
by: Igor | last post by:
Hello, i moved some scripts from one server to an other server (not my own, but on different service providers). The next script is not working anymore, i can't send a variable with a <a href>...
2
by: Gregor Horvath | last post by:
Hi, Before I reinvent the wheel I`d like to ask if someone has done this before since I did not find an advice at Google. The goal is to create a dynamic Tree View in HTML. Say I have a...
2
by: Charles Nadeau | last post by:
Hello, I am trying to craft a regular expression to filter an URL from a <a href=""></a> tag and the one I have doesn't seen right. I use the regular expression from this snippet of code: ...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
31
by: Yeah | last post by:
Is it absolutely necessary to include "http://" in an A HREF hyperlink? Would it be wise to remove this from one's Links page, just to save code?
3
by: universalbitmapper | last post by:
Hi, This exercise (From PAM525Web Development) asks me to display a table of reviews, then sort the reviews depending on which column heading is clicked. I can't find how to write this line:...
3
by: ajos | last post by:
Hello friends, In my action class i am getting a resultset data which im storing in a arraylist. In my jsp page im retrieving the arraylist data as-----> <%publicity.PendingReqForm prfObj=null;...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.