Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-23-2012, 05:23 AM   PM User | #1
Nirmalks
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Nirmalks is an unknown quantity at this point
GetElementsByID or Tag or Name

Hi All,

I have tried all the possible ways bit nothing seems to be working.

The below is part of a link. We need the click to be initiated for the Log On button. We are finding the button to click by GetElementsByTagName.

style = "width:100%"
href = "javascript:CallSubmit('onLoginNow');"
class = "SAPClass"
onMouseOut = "window.status = '';"
onMouseOver = "window.status = unescape('Log on'); return true;">
Log on


I have the following code configured but it it not working. I tried all the Tags with "Click" method of the object but not working:

aTags=.document.getElementsByTagName('INPUT')
for x = 0 to aTags.length
.document.GetElementsByTagName("INPUT").Item(x).Click()
.document.GetElementsByTagName("INPUT").Item(x).Click
ENDFOR

Thank you for whathever help you provide!
N
Nirmalks is offline   Reply With Quote
Old 10-23-2012, 09:54 AM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,261
Thanks: 10
Thanked 533 Times in 527 Posts
devnull69 will become famous soon enough
This is not Javascript so you are in the wrong section
devnull69 is offline   Reply With Quote
Old 10-23-2012, 10:06 AM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,697
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
It was originally posted in the HTML/CSS section and I couldn’t make any sense of this mumbo jumbo but it looked somewhat like JavaScript so I moved it here. What other programming language could that be?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 10-23-2012, 12:17 PM   PM User | #4
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,261
Thanks: 10
Thanked 533 Times in 527 Posts
devnull69 will become famous soon enough
With the for/to and end for it looks a lot like BASIC, maybe VBScript ...
devnull69 is offline   Reply With Quote
Old 10-23-2012, 09:06 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,055 Times in 4,024 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
I've never seen any language that used ENDFOR.

vbSCRIPT and BASIC would use NEXT.

But, yes, the FOR would be VBScript. And VBScript would ignore case, so then GetElementsByName would work, as well.

But for the rest of it...
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 10-24-2012, 06:16 AM   PM User | #6
Nirmalks
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Nirmalks is an unknown quantity at this point
Sorry for the confusion guys..

It is vbscript.

<a>
The below is part of HTML Page:
style = "width:100%"
href = "javascript:CallSubmit('onLoginNow');"
class = "SAPClass"
onMouseOut = "window.status = '';"
onMouseOver = "window.status = unescape('Log on'); return true;">
Log on
</a>

I need to initiate the click for "OnLoginNow button. I have tried but to no avail.

Thanks for your help
Nirmalks is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:48 AM.


Advertisement
Log in to turn off these ads.