473,396 Members | 1,847 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.

Javascript and an alias name

Hi,
I have elements my page with an "alias" in them
e.g.

<input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">

I am trying to refer to them using the alias name

var myObject= event.srcElement;
fieldID = myObject.id;
alias = myObject.alias

It keeps coming up as undefined.

Any suggestions?

Jun 5 '07 #1
3 2865
Lee
Jake G said:
>
Hi,
I have elements my page with an "alias" in them
e.g.

<input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">

I am trying to refer to them using the alias name

var myObject= event.srcElement;
fieldID = myObject.id;
alias = myObject.alias

It keeps coming up as undefined.
If you're testing in Internet Explorer, it's because you haven't
added an attribute named "alias". You added "iegAlias".
If you're testing in Firefox or some other browser, there are
a few other reasons, as well.
--

Jun 5 '07 #2
On Jun 5, 11:13 am, Lee <REM0VElbspamt...@cox.netwrote:
Jake G said:
Hi,
I have elements my page with an "alias" in them
e.g.
<input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">
I am trying to refer to them using the alias name
var myObject= event.srcElement;
fieldID = myObject.id;
alias = myObject.alias
It keeps coming up as undefined.

If you're testing in Internet Explorer, it's because you haven't
added an attribute named "alias". You added "iegAlias".
If you're testing in Firefox or some other browser, there are
a few other reasons, as well.

--
Sorry that was just a typo.

Here is what i have....

<input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">
var myObject= event.srcElement;

fieldID = myObject.id;
alias = myObject.iegAlias

alert("My Object " + alias)
alert("fieldID " + fieldID)

and alias is still coming up as undefined.

Jun 5 '07 #3
Lee
Jake G said:
>
On Jun 5, 11:13 am, Lee <REM0VElbspamt...@cox.netwrote:
>Jake G said:
>Hi,
I have elements my page with an "alias" in them
e.g.
><input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">
>I am trying to refer to them using the alias name
var myObject= event.srcElement;
fieldID = myObject.id;
alias = myObject.alias
>It keeps coming up as undefined.

If you're testing in Internet Explorer, it's because you haven't
added an attribute named "alias". You added "iegAlias".
If you're testing in Firefox or some other browser, there are
a few other reasons, as well.

--

Sorry that was just a typo.
The code you post for people to look at and debug should
always be copied and pasted directly from code that you've
tested in a browser and know behaves the way you describe.
>
Here is what i have....

<input type=hidden id="S_SELLOG" name="S_SELLOG" iegAlias="S_SELLOG01"
maxlength=1 title="Login/Logout" style="top:0; left:0;">
var myObject= event.srcElement;

fieldID = myObject.id;
alias = myObject.iegAlias

alert("My Object " + alias)
alert("fieldID " + fieldID)

and alias is still coming up as undefined.
And I'm left assuming that you're working in Internet Explorer
because you didn't say otherwise. There's not much that I can
guess about this without knowing what event is causing this
code to be executed.
--

Jun 5 '07 #4

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

Similar topics

4
by: news | last post by:
How would I create a database alias name for the following database testingdatabase.com This database exisist on a remote server. I have tried using the database name as server..dbo.table ...
14
by: John | last post by:
Hi all, I am doing the change from having worked in Oracle for a long time to MS SQL server and am frustrated with a couple of simple SQL stmt's. Or at least they have always been easy. The...
3
by: A.V.C. | last post by:
Hello, I found members of this group very helpful for my last queries. Have one problem with CASE. I can use the column name alias in Order By Clause but unable to use it in WHERE CLAUSE. PLS...
5
by: forum7 | last post by:
I need some immediate guidance with an error I am facing using an ActiveXObject to instantiate a DLL and use the object to launch a command on the local client. I use this great DLL called...
5
by: Santiago Ordax Solivellas | last post by:
Hi. We have almost all our tables defined on library lib1 and some on lib2. We have alias defined on lib1 to access tables on lib2 so there is no need to qualify library name. Alias for tables on...
2
by: jbatty | last post by:
I am trying to display an image on my page by using "img src= hyperlink". the hyperlink is stored in a c# variable. but i seem to have the syntax mixed up. This passing the image directly works...
3
by: petermichaux | last post by:
Hi, Is there a way to make one property an alias for another? This would mean that if the value of the original is changed then so is the value of the alias. I tried the following example and it...
0
by: Mahesh K. Anajni | last post by:
Hi We are working on a multilingual website. it has five URL (one original and four alias) for all the five languages. we are using RewriterRule in web.config to rewrite the Url. All this...
1
by: dwasler | last post by:
Try every thing I know to remove this alias I know there been other posting I read each one none seem to work. Thank You DLWasler dwasler@yahoo.com OS Window db2 V 8.2.X
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...

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.