Click here to Skip to main content
15,867,686 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Transfer JavaScript Array between pages Pin
Marc Firth20-Aug-09 2:47
Marc Firth20-Aug-09 2:47 
Questionhow to show an Alarm ? Pin
Lagziyan18-Aug-09 3:23
Lagziyan18-Aug-09 3:23 
QuestionClosing page in Java Script Pin
Hakmeh Mohannad17-Aug-09 20:53
Hakmeh Mohannad17-Aug-09 20:53 
AnswerRe: Closing page in Java Script Pin
Marc Firth17-Aug-09 23:48
Marc Firth17-Aug-09 23:48 
GeneralRe: Closing page in Java Script Pin
Hakmeh Mohannad18-Aug-09 0:11
Hakmeh Mohannad18-Aug-09 0:11 
GeneralRe: Closing page in Java Script Pin
Marc Firth18-Aug-09 0:13
Marc Firth18-Aug-09 0:13 
AnswerRe: Closing page in Java Script Pin
nacool31-Aug-09 0:54
nacool31-Aug-09 0:54 
QuestionAccessing remote window HTML elements via getElementsByTagName [modified] Pin
Art K17-Aug-09 11:26
Art K17-Aug-09 11:26 
Hello, I am trying to access HTML DOM elements in a remote window using JavaScript and getElementsByTagName but the resultant arrays are undefined.

<pre>
var remoteWin = window.open(URL,'rmtWindow');
remoteTags = remoteWin.document.getElementsByTagName("<tag>");
localTags = self.document.getElementsByTagName("<tag>");
</pre>

This works fine for localTags but not for remoteTags.
Am I not referencing the remote window correctly?

Also there seems to be some inconsistency in returned values:

<pre>
<a href="href URI string" param="hvalue"><img src="img URI string" param="ivalue"></a>
getElementsByTagName("a") returns the full "href URI string" string but getElementsByTagName("img") returns "[object HTMLImageElement]"
</pre>

I want to retrieve and manipulate the actual text strings of these elements, i.e., I want to access "img URI string", "hvalue" and "ivalue". I assume that I need to access properties of "[object HTMLImageElement]" to obtain the strings, including the strings for the optional parameter strings, but where or how do I find the definition of these properties?

Is there a way to associate the returned value for each embedded "img" element with its encapsulating "a" element? It is highly unlikely that the array indicies will match.

[Edit] Is the "img" element a child of the "a" element? If so I can associate them that way.

Thank you for your help, Art

[Edit] Firefox did not complain about this code, just left the values "undefined".
Opera [9.6], throws an exception and says "Security error: attempted to read protected variable".
Yet neither gives me any trouble when I write to a remote window. What's going on???

modified on Tuesday, August 18, 2009 4:56 AM

QuestionVolunteer FD Seeking Help in designing small training website Pin
MadFrenchieFire17-Aug-09 6:49
MadFrenchieFire17-Aug-09 6:49 
AnswerRe: Volunteer FD Seeking Help in designing small training website Pin
David Mujica17-Aug-09 8:06
David Mujica17-Aug-09 8:06 
GeneralRe: Volunteer FD Seeking Help in designing small training website Pin
MadFrenchieFire17-Aug-09 8:21
MadFrenchieFire17-Aug-09 8:21 
GeneralRe: Volunteer FD Seeking Help in designing small training website Pin
Marc Firth17-Aug-09 23:25
Marc Firth17-Aug-09 23:25 
QuestionEnterprise Java Bean help Pin
crain198117-Aug-09 6:24
crain198117-Aug-09 6:24 
Questionhow to edit more then 10000 html pages. Pin
Member 311322517-Aug-09 2:06
Member 311322517-Aug-09 2:06 
AnswerRe: how to edit more then 10000 html pages. Pin
Marc Firth17-Aug-09 2:35
Marc Firth17-Aug-09 2:35 
GeneralRe: how to edit more then 10000 html pages. Pin
Member 311322517-Aug-09 3:12
Member 311322517-Aug-09 3:12 
GeneralRe: how to edit more then 10000 html pages. Pin
Anurag Gandhi17-Aug-09 6:02
professionalAnurag Gandhi17-Aug-09 6:02 
GeneralRe: how to edit more then 10000 html pages. Pin
Member 311322517-Aug-09 20:57
Member 311322517-Aug-09 20:57 
Questionhow to show weather ,temperature,time country wise Pin
smiley_jatin16-Aug-09 19:26
smiley_jatin16-Aug-09 19:26 
AnswerRe: how to show weather ,temperature,time country wise Pin
Marc Firth16-Aug-09 22:10
Marc Firth16-Aug-09 22:10 
Questionnewsticker Pin
vikas shukla16-Aug-09 19:08
vikas shukla16-Aug-09 19:08 
AnswerRe: newsticker Pin
smiley_jatin16-Aug-09 19:54
smiley_jatin16-Aug-09 19:54 
AnswerRe: newsticker Pin
Marc Firth16-Aug-09 22:09
Marc Firth16-Aug-09 22:09 
QuestionDisplaying a div at the bottom of another div Pin
Ersan Ercek16-Aug-09 2:52
Ersan Ercek16-Aug-09 2:52 
AnswerRe: Displaying a div at the bottom of another div Pin
Abhishek Sur16-Aug-09 7:38
professionalAbhishek Sur16-Aug-09 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.