473,761 Members | 6,993 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

7 New Member
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_testwe b/"+variable+".xm l">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 2601
johny10151981
1,059 Top Contributor
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
SKbirdie
7 New Member
This is all being done on the server side. I will give this code a try. Thanks,
Aug 24 '10 #3
SKbirdie
7 New Member
The code I have to work with is........

<SCRIPT LANGUAGE="Speed Script">

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

</SCRIPT>

<SCRIPT LANGUAGE="javas cript">

function choice()
{
var variable=login. getElementById( "cLogin"). value;
document.getEle mentById("ancho r").href="/WI_testweb/"+login+".x ml";
</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 Top Contributor
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
SKbirdie
7 New Member
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
2600
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 ... What a horrible can of worms regex is!! (to the uninitiated at least). I realise that if I spend the next few weeks researching regex I'll probably find the answer but I was wondering if anyone here would kindly help speed up the process?
3
2073
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> command. Does anybody know why??? The file TEST.PHP: <html> <body>
2
3889
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 data strucure like this: structList =
2
8777
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: foreach my $message (@messages) { my @match=($message->decoded=~/\bhref="(http.*)">.*/gi);
2
9176
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 in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the
6
3875
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 place the tags one after another without any spaces between them. For example, a space gets rendered between these two href's when displayed in firefox or IE. <a href="#"><img border="0" height="10" src="test.gif" width="10" /></a>
13
7447
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" runat="server"></asp:imagebutton></A> When the user sees these buttons, they will currently be on the savings.aspx?category=whatever page, and when they click another button to look at other categories, all the links I have around these buttons direct to their various categories.
31
4864
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
2319
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: <th><a href=movie_details03.php?movie_id=$movie_id&coll_sort=\"review_date\">"Date
3
2126
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; ArrayList req=(ArrayList) request.getAttribute("req"); for(Iterator it= req.iterator();it.hasNext();){ prfObj=(PendingReqForm) it.next();{ %>
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9376
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9923
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3509
muto222
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.