473,396 Members | 2,002 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,396 software developers and data experts.

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

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.......form1

second page name....form2

form1.aspx

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

function openStationFrom()
{


window.open("../enquiry/form2.aspx?" & mstrSession & "&stnName="+escape(document.form1.stationFrom.valu e)+"&formName=Form1&fieldName=stationFrom&leftWidt h=0","","dependent=yes,width=350,height=375,screen X=200,screenY=300,titlebar=no,scrollbars=auto,maxi mize=no");
}

form2.aspx

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


<input type="hidden" name="fieldName" value='stationFrom'>

<select name="stationNameCode" 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.form2.stationNameCode.selectedIndex<0)
{
alert("Please Select The Station From The List");
return false;
}

formName = document.form2.formName.value;
fieldName = document.form2.fieldName.value;
window.opener.document.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 1817
acoder
16,027 Expert Mod 8TB
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
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...
3
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...
1
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...
4
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...
3
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...
7
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...
7
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...
3
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...
6
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.