set hidden

Issues related to hyperlinks and web site navigation.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/links.html
Post Reply
owain
 
 
Posts: 8
Joined: Mon Aug 27, 2018 11:45 am

set hidden

Post by owain » Fri Sep 07, 2018 4:06 pm

I would like to set a button hidden on startup of a page I have a script to so
but I don't know how and where to place the script so this can work
afterwords on who is logedin I wil set the button visible agian
this is the script I would like to use or is there an other way to so ?

<script>
function sethidden() {
document.getElementsbyname("button1").style.visibility = "hidden";
}
</script>

User avatar
Pablo
 
Posts: 13944
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: set hidden

Post by Pablo » Fri Sep 07, 2018 5:07 pm

You can initially hide objects in the Object Manager, or right click the object and select 'Hide'.
Alternatively, you can use a timer with or the 'ondocumentready' event to hide objects or do other initialization.

owain
 
 
Posts: 8
Joined: Mon Aug 27, 2018 11:45 am

Re: set hidden

Post by owain » Fri Sep 07, 2018 5:39 pm

oke thanks I wil try that

owain
 
 
Posts: 8
Joined: Mon Aug 27, 2018 11:45 am

Re: set hidden

Post by owain » Fri Sep 07, 2018 6:06 pm

Can please help me because I tryed this but now the button is also not longer visibel in de desinger?

an I would like to start a java script a function when I clik On the button I tryed to do this in the onclick event and than I clik the run javascript selection but where do I have to place the schript?

I placed it between the <head> </head> tags of the page but I think I make a mistaken in how I call the script what do I have to write in te box beneet the select option run java scrip?
Now I have put the following line there: Myfunction() ;
But do I have to write it difrent?

I have been searching on the forum but I can't find an example .

Thanks

User avatar
Pablo
 
Posts: 13944
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: set hidden

Post by Pablo » Fri Sep 07, 2018 6:14 pm

Can please help me because I tryed this but now the button is also not longer visibel in de desinger?
Correct. If you hide an object then it will not longer be visible.
an I would like to start a java script a function when I clik On the button I tryed to do this in the onclick event and than I clik the run javascript selection but where do I have to place the schript?
Normally functions are defined between the head tags.

Related tutorial:
http://wysiwygwebbuilder.com/add_html.html

Note that we cannot assist you with custom code. This requires some HTML/JavaScript knowledge, and that is not something we can teach you.
However all code works the same as in a standard HTML page. if the code does not work then either the code invalid, incomplete or conflicts with other code on the page.

owain
 
 
Posts: 8
Joined: Mon Aug 27, 2018 11:45 am

Re: set hidden

Post by owain » Sat Sep 08, 2018 9:11 am

Yes I know and I have som knowlegde of these things but I just dont know how to get it together in WB

owain
 
 
Posts: 8
Joined: Mon Aug 27, 2018 11:45 am

Re: set hidden

Post by owain » Sat Sep 08, 2018 9:20 am

The problem is what do I have to type when I have made a javaschript that is working outside of WB and I would like to run ii In WB when I add it to the onclik event?
Do I have to type it in brackets or without or something else?
the function does not start when I put something in the onclick event even if it is a simpel alert I must be doing something wrong but I have tryed serveral things finding this out but simpel how to start the function in a onclick event.

WWBman
 
 
Posts: 643
Joined: Fri Jan 08, 2010 6:10 pm

Re: set hidden

Post by WWBman » Sat Sep 08, 2018 9:57 am

In the button's Properties > Events > onclick event > Action = run javascipt
Enter sethidden(); in the Javascript: box.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests