IMO Needs some Javascript Behaviour

Javascript coding ..

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 215
Joined: Wed Dec 07, 2011 5:25 pm

IMO Needs some Javascript Behaviour

Postby TheProdigyGuy » Thu Feb 23, 2012 11:55 am

Hi Guys,i need small help to complete my small project)

I have simple js+html selection (aka combo box).
It works like charm but i need a bit *trick* it for my needs.
Problem in that it has default selected value when i call it *first time* (in eg: <option>1</option>)
When i select that <option>1</option> (without switching to other values) (in this case value = 1) i want it to alert(value) but can't figure it out because if it is selected *previously->currently* it will not alert(that.value)
I played with a lot of javascript behaviours in eg: (Onclick,ONDBLICK,ONfocus,Onselect,OnmouseOver,Onblur) etc.
Still can't figure it to work for my needs.
To be more clear again i need somehow (if possible of course) alert second time currently selected value without switching to other values.


Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  if (restore) selObj.selectedIndex=0;

<form name="form" id="form">
  <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 3 guests