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

small javascript function problem

i have the following jscript function
function OpenLookup(idname, lookupName, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmLookup.aspx?L OOKUP=' + lookupName +
'&PROFESSION=' + document.getElementById('txtProf').value
,null,'status:no;dialogWidth:520px;dialogHeight:37 5px;dialogHide:true;help:n
o;scroll:no');

window.alert(idname); --this is just me checking the idname

if (strReturn != null) document.getElementById(idname).value=strReturn;
}
the problem occurs in that the final statment can never find the control in
question. if i substitute idname with the actual field name it works fine.
why does it not recognise the value held within idname?
Nov 19 '05 #1
2 1132
there is no problem with the funtion. i was just being stupid!!
"Craig G" <craig.gamble@y_arrasoftware.com> wrote in message
news:e5**************@TK2MSFTNGP09.phx.gbl...
i have the following jscript function
function OpenLookup(idname, lookupName, postBack)
{
var strReturn;
strReturn=window.showModalDialog('frmLookup.aspx?L OOKUP=' + lookupName +
'&PROFESSION=' + document.getElementById('txtProf').value
,null,'status:no;dialogWidth:520px;dialogHeight:37 5px;dialogHide:true;help:n o;scroll:no');

window.alert(idname); --this is just me checking the idname

if (strReturn != null) document.getElementById(idname).value=strReturn;
}
the problem occurs in that the final statment can never find the control in question. if i substitute idname with the actual field name it works fine.
why does it not recognise the value held within idname?

Nov 19 '05 #2
> there is no problem with the funtion. i was just being stupid!!

At a public place? :D
Interesting. ;-)
--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://mastergaurav.blogspot.com
------------------------------------

Nov 19 '05 #3

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

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
7
by: Sharon | last post by:
Hiya I have a small question, I saw this piece of code somewhere (it's for creating a customized context menu) and I was wondering: Why is it that the STYLE and SCRIPT-tags are broken up into...
1
by: David | last post by:
Hi, I have a page which lists data via asp & database. Against each record is a text link. This link opens a window, sized by a Javascript function in the link code. Problem: All further...
1
by: Steven | last post by:
Hello, I have a Javascript function which will get executed only when I click a Image Button on my aspx page (code behind - C#). C# InImgBut on click function --> {...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
8
by: handersonVA | last post by:
Hello, I'd like to put small images around a big image, so when a small image is clicked, that image is shown as a big image in the center. how should I do that? I will use a table tag to organize...
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
1
by: gkellymail | last post by:
I have a small javascript/html code below that demonstrates that problem I'm having in a larger program. I've tried all kinds of things to get it to work, but it just won't do what I want. I've...
1
by: HACKhalo2 | last post by:
Hello. I want to make a PHP button that's small. Problem is, all my attempts either screwed up the layout or needed MUCH more code than i want to do. The page I'm using is set up with tables, if that...
6
by: Mark B | last post by:
I'd like a little window to pop up when a user clicks the hyperlink text "Grade Key": Grade Key Score Range A+ 95% - 100% A 90% - 94%...
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
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
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,...
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...
0
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...
0
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...
0
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...
0
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...

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.