473,748 Members | 4,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to append to URL ?

user input accepted via a input in the form.
this value needs to be appended to the current url (explained
below)

ie say present url is www.xyz.com and the user is asked
to enter his string and say he enters "john"
a hyper link needs to be created by appending this string, like
<a href="http://www.xyz.com/john"></a>
(the string "john" was the one input by the user in the input
field)
(where www.xyz.com is the current url)

it is easy to extract the value of the input field entered by the user
like document.forms[0].name1.value

how to use this value and append to the current url and then create a
new hyperlink with this appended string ?
Jul 20 '05 #1
2 26784
This may help:-
http://artlung.com/lab/scripting/change_all_links/

this is to change all links, but if you know the position of th elink on
your page you can just use it's 'i' number.

Stu

"brian" <br*********@ya hoo.com> wrote in message
news:af******** *************** ***@posting.goo gle.com...
user input accepted via a input in the form.
this value needs to be appended to the current url (explained
below)

ie say present url is www.xyz.com and the user is asked
to enter his string and say he enters "john"
a hyper link needs to be created by appending this string, like
<a href="http://www.xyz.com/john"></a>
(the string "john" was the one input by the user in the input
field)
(where www.xyz.com is the current url)

it is easy to extract the value of the input field entered by the user
like document.forms[0].name1.value

how to use this value and append to the current url and then create a
new hyperlink with this appended string ?

Jul 20 '05 #2
like:-

<a href="/0">Blah0</a>
<script language="javas cript">
function appendlink()
{
// Change 2nd link link item in array (3rd on page, arrays start at 0)
document.links[2].href= document.links[2].href + "/" +
document.test.s tring.value;
return false;
}
</script>

<form name="test" onsubmit="retur n(appendlink()) ;">
<input type="text" name="string">
<input type="submit">
</form>

<a href="/1">Blah1</a><br />
<a href="/2">Blah2</a> << This will be chnaged<br />
<a href="/3">Blah3</a><br />
<a href="/4">Blah4</a><br />
<a href="/5">Blah5</a><br />
<a href="/6">Blah6</a><br />

"Stuart Palmer" <tr**********@y oucant.com> wrote in message
news:JA******** ********@newsfe p2-gui.server.ntli .net...
This may help:-
http://artlung.com/lab/scripting/change_all_links/

this is to change all links, but if you know the position of th elink on
your page you can just use it's 'i' number.

Stu

"brian" <br*********@ya hoo.com> wrote in message
news:af******** *************** ***@posting.goo gle.com...
user input accepted via a input in the form.
this value needs to be appended to the current url (explained
below)

ie say present url is www.xyz.com and the user is asked
to enter his string and say he enters "john"
a hyper link needs to be created by appending this string, like
<a href="http://www.xyz.com/john"></a>
(the string "john" was the one input by the user in the input
field)
(where www.xyz.com is the current url)

it is easy to extract the value of the input field entered by the user
like document.forms[0].name1.value

how to use this value and append to the current url and then create a
new hyperlink with this appended string ?


Jul 20 '05 #3

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

Similar topics

9
1834
by: cody | last post by:
Why isn't there an StringBuilder.Append() overload with a StringBuilder as argument? Is there a reason that I missed?
25
7638
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
3
23956
by: Jonathan Buckland | last post by:
Can someone give me an example how to append data without having to load the complete XML file. Is this possible? Jonathan
9
4513
by: JMCN | last post by:
hi- i have inherited an access 97 database that keeps track of the loans. i have been running into referential intergrity problems when i try to append new loans to table. first of all is a linked table from another ms database. when i try to run the append query, i receive an error message that it cannot append all the records due to key violations to the . so i looked at all of the relationships and
1
2481
by: David Barger | last post by:
Greetings, It appears that an Append Query I run in Access XP is randomly failing to append a field. I have payroll data being entered into a payroll database. This data is exported daily to two csv files. (One for updated data, and the other for unupdated data.) The CSV files are attached to my Jobcosting database. After the CSV
5
5374
by: Michael C via AccessMonster.com | last post by:
Hello, I have a table that I am appending 3 seperate tables into. My main problem is that each time I append the data, it simply adds to the data already there. That might sound ok, except that if I append the data 3 times in succession, it copies the same data over 3x. Now I have copies in triplicate. It used to only transfer records that weren't already there, but not anymore. If I can't get the append to append correctly, I was...
0
1418
by: audleman | last post by:
I have an ASP form on my website where a visitor enters information. On submit, the form calls a stored procedure stores in a MS SQL 2000 database. The stored procedure works most of the time, but every once in a while I get an error 3421 (Application uses a value of the wrong type for the current operation) when I try to append the last parameter in the ASP code, which is a Varchar(500). Here's the relevant code: STORED PROCEDURE...
26
10132
by: John Salerno | last post by:
If I want to create a list of the form (where each item is repeated twice after the first one), how might I do that most efficiently? Right now I have this: series = for x in range(10): # just for testing series.append(series - 1)
2
8287
by: jeremito | last post by:
I have created a class that inherits from the list object. I want to override the append function to allow my class to append several copies at the same time with one function call. I want to do something like: import copy class MyList(list): __init__(self): pass
10
2123
by: HYRY | last post by:
I have the following questions, I am using Python 2.4.2 19167152 #1 11306608 #1 1. the address of a.append and list.append is different, can I get the address of list.append from a.append? 19162720
0
8830
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
9541
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...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
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...
0
8242
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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 we have to send another system
2
2782
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.