vbScript

  • Thread starter Edward Jones (Eddie)
  • Start date
E

Edward Jones (Eddie)

I have the following code :

Sub BottomTabs_onScriptletEvent(ByRef pstrEventName, ByRef pstrEventData)
Select Case pstrEventName
Case "onClick()"
MsgBox (pstrEventData)
pstrEventData.style.zIndex="5"
Case Else
End Select
End Sub

The message box print the text i want. I have layers setup with ID
corresponding with the pstrEventData strings. I want to change the z-index of
the layer (<div>) with id=pstrEventData.

In other word how do you use the object hierarchy on a variable whose value
is in the hierarchy? Please feel free to email me for more information ejones
(at) roanoke (dot) edu. Thank you.

pstrEventData.style.zIndex="5"
 
S

Steve Easton

How many possible values can pstrEventData have ??


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
E

Edward Jones (Eddie)

I define them by making the following call:

BottomTabs.Add "Google"

This will then build the html code for a tab with the label "Google".
pstrEventData simply returns the label for the tab clicked.

This could be thought of as a general web development question if you want
to access the style properties of a specific control with id=x but x is
stored as a string in a variable called xString how do set properties of:

x.style

using:

xString.style

I hope this clarifies the question. Thank you for your help on this matter
it has really got me stuck.
 
S

Steve Easton

If I understand this correctly, all you need to do is create a variable for the z index and
then apply it in the routine.

Dim strMyZindex as String.

Then check for the value of pstrEventData using If Then Else EndIf or If Then ElseIf
Then EndIF

Sub BottomTabs_onScriptletEvent(ByRef pstrEventName, ByRef pstrEventData)
Select Case pstrEventName
Case "onClick()"
If pstrEventData = value1 Then
strMyZIndex = a z order number you assign
ElseIf pstrEventData = value 2 Then
strMyZIndex = a different z order
EndIf
MsgBox (pstrEventData)
pstrEventData.style.zIndex= strMyZIndex
Case Else
End Select
End Sub

Does this help?
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top