473,602 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I have a link wich opens a the second page with links wich call a javascript functio

21 New Member
I have a link wich opens a the second page with links wich call a javascript function.

I have some problem with javascript.


i am two aspx page..

in my first aspx page contain the second aspx page name..

i am clicking the second page link the second page is opened..

but

i wrote the javascript finction in second page..

in this the function does not execute..

how to solve the problem.......

please help me..

first Page name.......form 1

second page name....form2

form1.aspx

<input type="text" name="stationFr om" size="16" value="" onblur="return openStationFrom ();" >

function openStationFrom ()
{


window.open("../enquiry/form2.aspx?" & mstrSession & "&stnName="+esc ape(document.fo rm1.stationFrom .value)+"&formN ame=Form1&field Name=stationFro m&leftWidth=0", "","dependent=y es,width=350,he ight=375,screen X=200,screenY=3 00,titlebar=no, scrollbars=auto ,maximize=no");
}

form2.aspx

<input type="hidden" name="formName" value='Form1'>


<input type="hidden" name="fieldName " value='stationF rom'>

<select name="stationNa meCode" size=5 >

<option value='voter id(vt)'</option>

<option value='passport (PO)"option>

</select>
<input type="button" value="GO" onclick=" return setStationField ()">

function setStationField ()
{
if(document.for m2.stationNameC ode.selectedInd ex<0)
{
alert("Please Select The Station From The List");
return false;
}

formName = document.form2. formName.value;
fieldName = document.form2. fieldName.value ;
window.opener.d ocument.forms[formName][fieldName].value = document.form2. stationNameCode[document.form2. stationNameCode .selectedIndex].value;
window.close();
}

this is my used source code..

my problem is..

i am click form2.aspx in GO button ..

i want to click the go button the form2 stationNameCode .selected index value go to form1.aspx to stationFrom text box..

i want to pass form2.selected index to form1.aspx

please help me.. how to do....
Jul 13 '07 #1
1 1839
acoder
16,027 Recognized Expert Moderator MVP
What errors do you see?

You're using "form1" in the first page and naming the form "Form1" in the second page.
Jul 14 '07 #2

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

Similar topics

4
2561
by: Marco | last post by:
I made an html-page with this line in it: <A HREF="http://www.bla.com" onClick="javascript:window.close()" target="moeder">link</A> It works very well in Internet Explorer, but in Netscape 7 the url isn't opened in the moeder window. How come and how can I fix it so it works in Netscape too? Thanks in advance for any answers. Mrco
3
17076
by: Matt Adams | last post by:
As well known I could specify the text color in the body tag like: <BODY TEXT=WHITE LINK=WHITE VLINK=RED ALINK=WHITE> What I want to achieve now is that always (!) the text of the last visited link and the text of the link under the cursor are red. All other links should be white. The problem with the construction above is that a visited link remains for the rest of the session red regardless wether it was visited 17 clicks back in...
1
13537
by: Mat | last post by:
How can I detect when a link has been clicked but the new page is still in the process of loading? The document.location.href property still displays the current location (understandably) not the one that's about to load. I have a page that reloads every 30 seconds in order to access live data. If a user clicks on a link just prior to the page reloading the reload takes precedence over the link click and this is annoying for the users....
4
56654
by: KS | last post by:
Im trying to prevent the user from clicking any other links on my page when the user have selected/clicked a href once. Sometimes it takes a while before the next page loads so some user will try clicking other links or the same link. I can prevent this when i use buttons by calling onclick and in a javascript getElementsByTagName("input") and then check the type to be type of "button" or "submit" which i then disable. It works. This also...
3
5170
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same image. What I would like to create is a link that can be clicked on to close the window that contains the larger image. This would make it easier for the users to close the window. I have posted the script that I use. Any help would be much...
7
23002
by: lawrence | last post by:
In my style sheet I've set the links like this: a:link{ text-decoration:none; } I did that for the pseudo classes and I also did that for the image tag. Yet there are still link lines around the images. Why? It's on this page:
7
3495
by: alberta soranzo | last post by:
i'm trying to send a mass-email using microsoft's list builder (http://www.bcentral.com/products/lb/default.asp). my html file is clean and the javascript links work fine in all browsers. when the emails are received though, clicking on the links opens two browser windos: one --on top -- displays the content correctly. the other one - always on the bottom -- displays "". is there something i should change in the links to make them work in...
3
2249
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up window. It's a pop-up window in the sense that it's smaller than the man page and is intended to be viewed and then closed. The problem is that if I include a link on that pop-up window HTML page, when the link is clicked the new page opens IN the...
6
3184
by: Karl | last post by:
Hi, Ok so on a given page I have 4 text links: see it in black see it in blue see it in red see it in green using the standard swap image behavior, clicking on one of the above links
0
7993
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
8404
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
8268
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
6730
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...
0
5440
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
3900
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...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
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
1
1510
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.