Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

2 in 1, separate html code, fall down menu

html

Best Answer BlackRabbit, 29 June 2014 - 02:38 PM

In HTML, sharing code, is done by .js (javascript), or .css files. That you can include in every HTML file you want.

 

About the menu, It shouldn't work like that. Select is just like a text label, something to be evaluated later, when the form-post button is pressed.

So, What you need to do is to name and ide the <select>, and if you want an instantaneous reaction to a selection what you need is javascript, which you can do through the select->OnChange/OnSelect,etc events.

 

Click here for an example

 

It will not take you long to understand how it all works with the HTML DOM ;)

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 JonElias

JonElias

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 201 posts

Posted 28 June 2014 - 12:44 AM

I am learning html, and while i am learning it i am making mynown website.
I wonder if it is possible to have html code in a document, and then use it on other documents.
And how do i make a menu which falls down when the mouse hovers over a spesific icon of text.

Update:
I found out about dropdown menu on another post
http://forum.codecal...-html-dropdown/

Edited by JonElias, 28 June 2014 - 12:46 AM.

"computers are useless they only give you answers" Pablo Picasso
And yes he was alive when the first programmable computer was made

#2 JonElias

JonElias

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 201 posts

Posted 28 June 2014 - 02:38 AM

i am like findig about this as i go.

the other forum post didnt help me.

but i found out how to use the select tag and option to kinda do it.

that code looks like this

 

<select>
<option value="Html">HTML</option>
<option value="Html"><a href="/html/bilde.html">Bilde</a></option>
<option value="Html"><a href="/html/css.html">Css</a></option>
</select>

but when i select the option from the list it dosent go to the document i have refereed to.

i am using apples safari browser.

how do i link the selection of that option to go to a spesific document


Edited by JonElias, 28 June 2014 - 02:39 AM.

"computers are useless they only give you answers" Pablo Picasso
And yes he was alive when the first programmable computer was made

#3 JonElias

JonElias

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 201 posts

Posted 29 June 2014 - 01:44 PM

Anyone?
"computers are useless they only give you answers" Pablo Picasso
And yes he was alive when the first programmable computer was made

#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 29 June 2014 - 02:38 PM   Best Answer

In HTML, sharing code, is done by .js (javascript), or .css files. That you can include in every HTML file you want.

 

About the menu, It shouldn't work like that. Select is just like a text label, something to be evaluated later, when the form-post button is pressed.

So, What you need to do is to name and ide the <select>, and if you want an instantaneous reaction to a selection what you need is javascript, which you can do through the select->OnChange/OnSelect,etc events.

 

Click here for an example

 

It will not take you long to understand how it all works with the HTML DOM ;)



#5 JonElias

JonElias

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 201 posts

Posted 30 June 2014 - 02:03 AM

Thanks that solves my problem.
But i ment shared html code for a menu i use which gets updated a lot because i am making while i am learning, if that is even possible
"computers are useless they only give you answers" Pablo Picasso
And yes he was alive when the first programmable computer was made




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download