Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Calling MM_showHideLayers from VBScript

New Here ,
Dec 02, 2006 Dec 02, 2006

Copy link to clipboard

Copied

I am trying to call the MM_ShowhideLayers function from a VBScript that is evaluating a database and then showing and hiding regions bases on the a dynamic value. I am using #Setting1, #Setting2, etc. in my linked CSS file. Since I am not familiar with Javascripting, I was trying to have VB Script that is looping through all of the corrisponding settings in the file and then setting per values. The M_ShowhideLayers function evaluates the args passed. VB is having issues with this when trying to pass the values. Can someone provide some help. There is probably an easy way to do from vbscript, but I am still learning. :)

Here is the sample VB code:

While NOT rec_reservedbooths.EOF
If rec_reservedbooths.status = "R" Then
Call MM_showHideLayers("Booth" & rec_reservedbooths.Fields.Item("boothid").Value,"","show")
Else
Call MM_showHideLayers("Booth" & rec_reservedbooths.Fields.Item("boothid").Value,"","hide")
End If
rec_reservedbooths.MoveNext()
WEnd

Thanks,

David
TOPICS
Server side applications

Views

601
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 02, 2006 Dec 02, 2006

Copy link to clipboard

Copied

do you mean the function generated by the client behavior show-hide
layers? if it's what you're trying to do, simply you can't. the function
is client-side JS executed in the browser while your VBScript code
executes at the server before the page is sended to the browser

just put the HTML code corresponding to the layer inside the If sending
it with a Response.write:

If rec_reservedbooths.status = "R" Then
Response.write "<div>"
...
End If

dwb67 wrote:
> I am trying to call the MM_ShowhideLayers function from a VBScript that is
> evaluating a database and then showing and hiding regions bases on the a
> dynamic value. I am using #Setting1, #Setting2, etc. in my linked CSS file.
> Since I am not familiar with Javascripting, I was trying to have VB Script that
> is looping through all of the corrisponding settings in the file and then
> setting per values. The M_ShowhideLayers function evaluates the args passed.
> VB is having issues with this when trying to pass the values. Can someone
> provide some help. There is probably an easy way to do from vbscript, but I am
> still learning. :)
>
> Here is the sample VB code:
>
> While NOT rec_reservedbooths.EOF
> If rec_reservedbooths.status = "R" Then
> Call MM_showHideLayers("Booth" &
> rec_reservedbooths.Fields.Item("boothid").Value,"","show")
> Else
> Call MM_showHideLayers("Booth" &
> rec_reservedbooths.Fields.Item("boothid").Value,"","hide")
> End If
> rec_reservedbooths.MoveNext()
> WEnd
>
> Thanks,
>
> David
>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 02, 2006 Dec 02, 2006

Copy link to clipboard

Copied

In my code, I have <div> tag linked to a CSS style. So, how would you change the CSS property in vbscript? I appologize, but I am still learning.

<div id="booth129"></div> is tied to #booth129 in the CSS file.

With this said, how would you change the visiblility value at runtime for the rulue definitions of #booth129 via vbscript?

Thanks,

David

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2006 Dec 03, 2006

Copy link to clipboard

Copied

LATEST
Try something like

<%
While NOT rec_reservedbooths.EOF
If rec_reservedbooths.status = "R" Then
%>
do something here
<%
End If
rec_reservedbooths.MoveNext()
WEnd
%>

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004





Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines