By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,659 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,659 IT Pros & Developers. It's quick & easy.

Javascript and an alias name

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.