The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

i want to change this coords to menu

View previous topic View next topic Go down

Solved i want to change this coords to menu

Post by Michael_vx on November 1st 2015, 4:24 am

how to change these Script from coords mode to a menu mode
due the coords mode is not working with px view and the site pages wont view in % mode
thank you
Code:
  <div class="MjanyFolatRight Color">
  <map id="Color" name="Color">
  <area alt="" coords="126, 18, 142, 35" href="javascript:chooseStyle('BdCo1',60)" shape="rect" target="_self" title="الأحمر" />
  <area alt="" coords="105, 19, 123, 35" href="javascript:chooseStyle('BdCo2',60)" shape="rect" target="_self" title="الأزرق" />
  <area alt="" coords="87, 19, 103, 35" href="javascript:chooseStyle('BdCo3',60)" shape="rect" target="_self" title="الموف" />
  <area alt="" coords="68, 19, 85, 36" href="javascript:chooseStyle('BdCo4',60)" shape="rect" target="_self" title="الفيروزي" />
  <area alt="" coords="47, 19, 65, 34" href="javascript:chooseStyle('BdCo5',60)" shape="rect" target="_self" title="الأخضر" />
  <area alt="" coords="26, 19, 50, 35" href="javascript:chooseStyle('BdCo6',60)" shape="rect" target="_self" title="البرتقالي" />
  </map>
  <img alt="" class="Color" src="vx_soft/Co1/img/spacer.gif" usemap="#Color" /></div>
<link rel="stylesheet" type="text/css" href="http://micsoft.ga/vx_soft/Co2/Css.css" />
<link href="vx_soft/Co1/Css.css" media="screen" rel="alternate stylesheet" type="text/css" title="BdCo1" />
<link href="vx_soft/Co3/Css.css" media="screen" rel="alternate stylesheet" type="text/css" title="BdCo3" />
<link href="vx_soft/Co4/Css.css" media="screen" rel="alternate stylesheet" type="text/css" title="BdCo4" />
<link href="vx_soft/Co5/Css.css" media="screen" rel="alternate stylesheet" type="text/css" title="BdCo5" />
<link href="vx_soft/Co6/Css.css" media="screen" rel="alternate stylesheet" type="text/css" title="BdCo6" />

the needed Script better be a HTML not Java


Last edited by Michael_vx on November 3rd 2015, 9:01 am; edited 1 time in total

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by SLGray on November 1st 2015, 5:12 am

What exactly does this code do?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 1st 2015, 6:37 am

that is a theme changer
its like fast changer by just push

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 2nd 2015, 6:20 am

i think i got the main part
the links are

Code:
javascript:chooseStyle('BdCo1',60)" shape="rect" target="_self" title="البرتقالي" />
javascript:chooseStyle('BdCo2',60)" shape="rect" target="_self" title="البرتقالي" />
javascript:chooseStyle('BdCo3',60)" shape="rect" target="_self" title="البرتقالي" />
javascript:chooseStyle('BdCo4',60)" shape="rect" target="_self" title="البرتقالي" />
javascript:chooseStyle('BdCo5',60)" shape="rect" target="_self" title="البرتقالي" />
javascript:chooseStyle('BdCo6',60)" shape="rect" target="_self" title="البرتقالي" />

can these links being in a HTM menu that dose not change the page but do its job to get CSS links as it should be in defaults

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by SLGray on November 2nd 2015, 6:32 am

Have you tried the tutorial in the tips & tricks section?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 2nd 2015, 6:57 am

Part me but i have no idea about the tutorial you are talking about
do you mind showing it to me Very Happy
and thanks

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Ange Tuteur on November 2nd 2015, 12:00 pm

This is the one : http://help.forumotion.com/t135248-add-a-theme-picker

It's a bit dated, but it should still do the trick.


As for the map, you could try turning the contents into a link. That is, convert this :
Code:
<area alt="" coords="105, 19, 123, 35" href="javascript:chooseStyle('BdCo2',60)" shape="rect" target="_self" title="الأزرق" />

into an <a> tag :
Code:
<a href="javascript:chooseStyle('BdCo2',60);">الأزرق</a>

I didn't test the code you posted, but I'm pretty sure it'll give you the same effect if you convert the <area> elements into an <a> tag, and then put the javascript statement in the href attribute. You'll want to turn <map> into a <div> or something, though. Mr. Green

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 2nd 2015, 1:45 pm

can this <a thing used for a drop menu or something like that
a menu also with images
like icons drop menu to pick from if possible
thanks Very Happy

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Ange Tuteur on November 2nd 2015, 3:47 pm

Well, for a dropdown menu you'd usually use the <select> element.

Something like this for example :
Code:
<select id="select_box">
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
  <option value="3">Option 3</option>
</select>

Then some JavaScript to execute when the value is changed :
Code:
$(function() {
  document.getElementById('select_box').onchange = function() {
    switch (this.value) {
      case '1' :
        chooseStyle('BdCo1',60);
        break;

      case '2' :
        chooseStyle('BdCo2',60);
        break;

      case '3' :
        chooseStyle('BdCo3',60);
        break;

      default :
        'Code to execute by default';
        break;
    }
  };
});

You see the number for each case corresponds to the value of each <option> element. Here's a small tuto on the switch statement if you're interested : http://www.w3schools.com/js/js_switch.asp

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 2nd 2015, 10:22 pm

im a man who learn by Exaimpls not by reading things
live Exaimpls Very Happy
i went in trouple in the JavaScript cos i was needing to add it in HTML way but
<script> and </script> did the job right
topic is solved
i have one last qeustion answer it and archive the tope
is that possible to use
image instead of a text in the
Code:
<option value="1">Option 1</option>
let me know by only yes or no Very Happy
and sorry for bothering
thanks again
really thanks

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Ange Tuteur on November 3rd 2015, 12:20 am

No, unfortunately you cannot use <img> tags inside an <option> element. It's possible to put them there, however, it'll just display as blank texte.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Michael_vx on November 3rd 2015, 9:02 am

no problem i understand
thanks a lot
really thanks for the big help

Michael_vx
Forumember

Male Posts : 655
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: i want to change this coords to menu

Post by Ange Tuteur on November 3rd 2015, 10:28 am

You're welcome ^^

Topic archived

Have a good day. Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum