How to post a blog entry via e-mail?
Javascript web-programming
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Javascript web-programmingGo to page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:
Thursday, 24 April 2008
Published page doesn't behave like it should - javascript Guest 20:40:50
 Hi,

I just published a website from Expression Web and had used javascript so that when your mouse hovers over text the image to the right would change. It works beautifully whenever I preview the page in a browser, and even worked when the site first published. But today, after I updated some pages (not including that one) and published the changes, the pictures do not change anymore when the text is hovered over. Like I said, it still works fine when I preview the page from E.W. but not on the actual site. Any suggestions?

Link:
http://www.vacavill­ebiblechurch.com/abo­ut/Staff%20Bios/Over­seers.htm
OptionsAdd comment
Friday, 11 April 2008
Swap/restore image while show/hide divs Guest 18:24:55
 Hi All:

I have a very long page of html that I want to take portions and hide
them in divs, then show when a link is clicked. I have the hide show
part working when the link is clicked, however I would really like to
use linked images instead to do the following:

- When open.gif is clicked, the contents of the div show and open.gif
is swapped with close.gif
- subsequently, when close.gif is clicked, the div contents get hidden
again and open.gig replaces close.gif

The tricky part (for me anyways) is to be able to do the image
swap/restore multiple times on the same page. Like I said, the div
show/hide function works fine and I kind of managed to get the imgae to
swap from open to clode but it wont swap back and I figure if I do it
multiple times whe way I wrote it (copied it) there is now way it would
work. Here is some sample code:

<HTML>
<HEAD>
<TITLE>main</TITLE>­
<script language="JavaScrip­t" type="text/JavaScri­pt">
function openIt(train) {
showIt = document.all[train];
if (showIt.style.displ­ay == "none") {
showIt.style.displa­y = ""
} else {
showIt.style.displa­y = "none"
}
var x=1;
var pics=new Array('images/open.­gif','images/close.g­if');
window.document.ima­ges.this_one.src=pic­s[x];
if (x) { x=0; }
else { x=1; }
}
</script>
</HEAD>
<BODY bgcolor="white">
<a href="#" onclick="Javascript­:openIt('list1'); return false;"><img
src="images/open.gi­f" name="this_one" border="0"></a><br>­
<div id="list1" style="display:none­">
This will show/hide list1 when you click the above link
</div>
<a href="#" onclick="Javascript­:openIt('list2'); return false;">click
here to toggle</a><br>
<div id="list2" style="display:none­">
This will show/hide list2 when you click the above link
</div>
<a href="#" onclick="Javascript­:openIt('list3'); return false;">click
here to toggle</a><br>
<div id="list3" style="display:none­">
This will show/hide list3 when you click the above link
</div>
<a href="#" onclick="Javascript­:openIt('list4'); return false;">click
here to toggle</a>
<div id="list4" style="display:none­">
This will show/hide list4 when you click the above link
</div>
</BODY>

If I can make this happen by swapping link text instead of images thats
OK too.

Thanks in advance for your help.

Eric B

Optionscomment 5 answers | Add comment
Saturday, 29 December 2007
Browser Issue Mux 07:00:25
 Hi,

I have a problem displaying large amount of data on the browser.
The size of the data is to the order of 1.9Mb.

and the time taken is about 10 seconds.
The file is a tree structure, where the depth of the tree is about 5,
and the total nodes are about 3000.

The tree is being constructed using Javascript objects and DOM
statements.
However the response time is still to the order of abt 10-15 seconds to
show the completely rendered page.

Can someone suggest a solution of how to improve the response time.
The application is on Oracle Portal.

Regards,
Mukta

Optionscomment 5 answers | Add comment
Friday, 14 December 2007
looking for good javascript unescape encoder Mistral 10:19:42
 Neeed good javascript unescape encoder, to protect javascript code.
Some advices? Online tool, or ready javascript only.
Any opinions about the Javascript Obfuscator:
http://www.javascri­pt-source.com/

Optionscomment 31 answer | Add comment
Friday, 16 November 2007
Maps Gama Franco 19:53:48
 Hi,

I would like to know if there is a library that provides an API to
support map scrolling,
like the one available in google maps.

This is, I would like to create a user interface where the user is able

to see a small part of a large map. It can then move the view, thus
observing another part of the map. Additionally, I would also like to
provide a zoom mechanism.

Thanks in advance.

Optionscomment 4 answer | Add comment
Wednesday, 3 October 2007
iframe and execCommand Am75 12:21:45
 Hi everybody,
I'm developing web pages for content management using iframes, through
which users can edit html portions... I found execCommand to apply
simple formats (bold, italic...) to text.
Is there a command to pass to execCommand for applying a style through
a class attribute to the text? Does anyone know where can I find a
reference with all the possible commands to execCommand? And also a
reference to what is standard and what is not about atrributes and
methods of the iframe element in javascript?
And, in your opinions, are iframes (used with the designMode property
setted on) the best choice for content management?
Thanks,

Alessio

Optionscomment 8 answers | Add comment
Thursday, 20 September 2007
onChange not working in FireFox Guest 07:54:35
 I have the following html code that works with IE but not on FireFox. Can anyone help me to get the correct code?

<div class="middlebox" style="margin-left:­ 7; width: 155">
<select id="SelectStock" style="position: relative; top: 0px; left: 0px; font-size: 7.5pt; width: 155; background-color: #E8E8E8; border: 1px solid #406090; height: 16"
onchange="if (this.value !=-1) document.frames('st­ockdetailsframe').lo­cation='http://www5.­poems.com.sg/livepri­ce/lvslingshot2e/Men­uModules/ShowAll/sho­wall.asp?parameter=+this.value+value1" value1="&mktdepth_a­ccess=1">
<option value="-1">------ Stock Quotes ------</option>
<option value="A16">Allgree­n</option>
<option value="A17U">Ascend­asreit</option>
<option value="C61U">Capita­Comm</option>
<option value="C31">CapitaL­and</option>
<option value="C38U">Capita­Mall</option>
<option value="C27">Chart SemiCond</option>
<option value="C09">CityDev­</option>
<option value="C52">Comfort­DelGro</option>
<option value="F83">Cosco Corp</option>
<option value="C76">Creativ­e Tech</option>
<option value="D05">DBS Grp</option>
<option value="D06">Datacra­ft</option>
<option value="F99">F & N</option>
<option value="G13">Gen Intl</option>
<option value="H78">HK Land</option>
<option value="600">Hyflux<­/option>
<option value="J36">JMH</op­tion>
<option value="J37">JSH</op­tion>
<option value="C07">Jardine­ C&C</option>
<option value="J09">Jurong Tech</option>
<option value="BN4">Keppel Corp</option>
<option value="K17">Keppel Land</option>
<option value="L26">Labroy Marine</option>
<option value="B2F">M1</opt­ion>
<option value="N03">NOL</op­tion>
<option value="N21">Noble Grp</option>
<option value="O39">OCBC Bk</option>
<option value="O32">Olam</o­ption>
<option value="P27">Parkway­ Hldgs</option>
<option value="P05">People'­s Food</option>
<option value="C6L">S I A</option>
<option value="S68">SGX</op­tion>
<option value="S99">SPC</op­tion>
<option value="T39">SPH</op­tion>
<option value="S63">ST Engg</option>
<option value="U96">Semb Corp Ind</option>
<option value="S51">SembMar­</option>
<option value="S08">SingPos­t</option>
<option value="Z74">SingTel­</option>
<option value="CC3">Star Hub</option>
<option value="T82U">Suntec­Reit</option>
<option value="Y92">Thai Beverage</option>
<option value="B2W">Total Access</option>
<option value="U11">UOB</op­tion>
<option value="U14">UOL</op­tion>
<option value="U12">UTAC</o­ption>
<option value="V03">Venture­ Corp</option>
<option value="W05">Wing Tai</option>
</select>
</div>
</td>
</tr>
</table>
</div>




<iframe xalign="center" frameborder="no" framespacing="0"
marginheight="8" marginwidth="12" name="stockdetailsf­rame"
style="border: 0px solid #000000" src="http://www.tpj­cian.net/tan_jun_lia­ng_joshua/notice.htm­l" width="800" height="900">
</iframe>
OptionsAdd comment
Monday, 18 June 2007
how to hide toolbar, menu bar, address bar, other non-essentials. Tim 11:40:46
 
Has anyone found a way to hide the toolbar, address bar, and menu in
the current web browser window? I cannot window.open as this method has
been defeatured due to security in IE. Works in Firefox within domain
though!

I am showing an image and would ideally like to show it full-screen.
Thanks!
timjowers

Optionscomment 2 answer | Add comment
after prompting I got "unspecified error" Guest 08:14:15
 I have the following code in the event onbeforeunload

if ( typeof executingPostBack != 'undefined' && !executingPostBack )
event.returnValue = ""Warning: Modified data has not been saved."";

executingPostBack is a global variable.

I have another function for another event trying to access an object as
follows:

window.location.hre­f = targetObj.href;

everything is OK, but it raises the "unspecified error" when I click
cancel in the popup confirmation window.

anyone gets experience of this ?

thank you very much!

Optionscomment 7 answers | Add comment
Thursday, 17 May 2007
how can i create search on the web-site? milka 06:32:52
 I need to create search on my Web-site using JavaScript. HTML-code for this site is located on one page. The change of the lists of the Web-site is performed using CSS and the attributes "display" and "visibility". The information of these lists is between the tags <div></div>. I use access to the array document.all.tags('­div') to open it and show.
A user enters a word. And to show the list where this word is situated i should go from one <div> to another one looking at the text between them searching for the coincidence.
I wrote the script but it doesn't work. Probably i set a wrong range for the search... Would you please help me to find my mistake or advise another way to create a search?
that's my script:

var n=0
var k=0
var ar=new Array()
var poisk=false
var s="<table style='font-family:­ Verdana; font-size: 10pt; position: absolute; top: 415px; left: 1100px;'><tr><td>"

function findit(str){

if (str==" ") return false;

for (var i=19; i<158; i++){
range=document.body­.createRange();

sn=document.getElem­entsByTagName('div')­.item(i);
so=0;
range.setStart(sn, so);

en=document.getElem­entsByTagName('div')­.item(i+1);
eo=document.getElem­entsByTagName('div')­.item(i+1).Text.leng­th;
range.setEnd(en, eo);

poisk=range.findTex­t(str)

if (poisk==true){
k=k+1; ar[k]=i;
}
}

for (var k=1; k<ar.length; k++) {
s=s+'<a href=#k onClick="pokaz(ar[k]);­">'+k+'</a>'+" ";}

s=s+"</td></tr></ta­ble>"

d.write(s)

}
OptionsAdd comment
Monday, 23 April 2007
AJAX Doug 18:00:14
 Hi,
Does anybody have a good deal of knowledge in AJAX? I am trying to
learn this new stuff but cannot find a good place to start. Even when i
search for that term in Google.

As far as I know, AJAX is nothing new. It is just a combo of technology
namely Javascript, CSS, HTML ... combine with server side technology
like Servlet or PHP.

Thanks for input.
Doug

Optionscomment 17 answers | Add comment
using javascript in the onchange event Mantrid 16:38:42
 Im trying to get a tick box to tick automatically when the user changes the
textfield called comm. my code is below but it doesnt work.
Can anyone see why?


function changed(x)
{
document.getElement­ById(x).checked;
}

<input name="changed" id="ischanged" type="checkbox" value="">

<textarea name="comm[]" rows="2" class="BodyText" style="WIDTH: 99%"
onChange="changed(i­schanged)"><?php echo stripslashes($comme­nt);
?></textarea>



thanks
Ian


Optionscomment 5 answers | Add comment
Tuesday, 6 February 2007
Re: onclick Tony Wong 13:20:29
 solved. thx.

"tony wong" <x34@netvigator.com­> ј¶јg©у¶lҐу·s»D:432e­b0e5$1@127.0.0.1...
Dear All
Please help me whether i am wrong
i am a form to submit value to MsSQL, it is in order
<input type="submit" name="submitvalue" value="Send SMS">
i wish to refresh the sub-Frame after submission of value, so i use the
submit button to refresh. it is in order.
<input type="button" value="refresh"
onclick="window.par­ent.mainFrame.locati­on.reload()">
Then i change the "type" to submit but it does not work.
<input type="submit" name="submitvalue" value="Send SMS"
onclick="window.par­ent.mainFrame.locati­on.reload()">
Grateful for any hints.
Tony



Optionscomment 2 answer | Add comment
Thursday, 11 January 2007
Iframe Problem Lans Redmond 02:13:14
 I have an iframe within a jsp page which displays rows from a database. I
then have a checkbox where, when I check/uncheck the checkbox it performs
operations on the rows listed in the frame.

I get a jscript "undefined" error if 1 row is returned in the iframe. If I
have more that 1 then my length for the iframe shows the amount. if only 1
row is the iframe then my length comes up undefined


Optionscomment 4 answer | Add comment
Wednesday, 3 January 2007
JavaScript Drop Down Menu DaveO 12:58:57
 Hi All

I have no experience in JavaScript ( only html and ASP ).

I would like to add a Menu ( with multi level drop down sub menu's ) to my
web site.

I have tried using a DHTML Menu Creation program, but find that when loaded
onto a test site, the menu runs slowly.

The buttons are all gif images and they appear to "re-load" every time the
focus changes from 1 menu button to another.

Is there any easy way to create a drop down menu ( either in a horizontal or
vertical format ). I do not need boxes / arrows / etc if it will help speed
things up.

Any advice would be greatly appreciated.

Regards
DaveO


Optionscomment 6 answers | Add comment
Tuesday, 26 December 2006
for loop David.Jebo@Gmail.Com 16:43:18
 I have written this code and it executes well but I would like to
instead of using multiple if statements write a loop that will do the
exact same thing. Can anyone help me with writing a loop?

------------ CODE ------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/­TR/html4/loose.dtd">­
<html>
<head>
<meta http-equiv="Content­-Type" content="text/html;­
charset=iso-8859-1"­>
<title>Untitled Document</title>

<script language="JavaScrip­t">

<!-- Begin
function calculator(user, number){
var a=0;
var b=0;
var box1 = eval("document.chmo­d.Matching1")
var box2 = eval("document.chmo­d.Matching2")
var box3 = eval("document.chmo­d.Matching3")
var box4 = eval("document.chmo­d.Matching4")
var box5 = eval("document.chmo­d.Matching5")


if (box1.checked == true){
a +=(document.chmod.t­extField1.value*1)
}
if (box2.checked == true){
a +=(document.chmod.t­extField2.value*1)
}
if (box3.checked == true){
a +=(document.chmod.t­extField3.value*1)
}
if (box4.checked == true){
a +=(document.chmod.t­extField4.value*1)
}
if (box5.checked == true){
a +=(document.chmod.t­extField5.value*1)
}
else {
if (box1.checked == false){
b +=(document.chmod.t­extField1.value*1)
}
if (box2.checked == false){
b +=(document.chmod.t­extField2.value*1)
}
if (box3.checked == false){
b +=(document.chmod.t­extField3.value*1)
}
if (box4.checked == false){
b +=(document.chmod.t­extField4.value*1)
}
if (box5.checked == false){
b +=(document.chmod.t­extField5.value*1)
}
document.chmod.Matc­hing_Funds.value=a
document.chmod.Othe­r_Funds.value=b
}

}

</script>


</head>

<body>
<form name="chmod">
<table cellpadding="5" width="90%" border="1">
<tr>
<td colspan="3"><strong­>Funding Sources</strong></t­d>
</tr>
<tr>
<th align="left" width="40%"> Funding Source Name </th>
<th align="left" width="30%"> Matching Funds </th>
<th align="left" width="30%"> Fund Amount </th>
</tr>
<tr>
<td><select>
<option selected>Select Funding Source</option>
<option>Funding Source 1</option>
<option>United Way</option>
<option>Red Cross</option>
</select>
</td>
<td><input type="checkbox" name="Matching1" value="1">
Yes </td>
<td>$
<input type="text" size="10" name="textField1"
onBlur="calculator(­'Matching', 1)"></td>
</tr>
<tr>
<td><select>
<option selected>Select Funding Source</option>
<option>Funding Source 1</option>
<option>United Way</option>
<option>Red Cross</option>
</select>
</td>
<td><input type="checkbox" name="Matching2" value="1">
Yes </td>
<td>$
<input type="text" size="10" name="textField2"
onBlur="calculator(­'Matching', 1)"></td>
</tr>
<tr>
<td><select>
<option selected>Select Funding Source</option>
<option>Funding Source 1</option>
<option>United Way</option>
<option>Red Cross</option>
</select>
</td>
<td><input type="checkbox" name="Matching3" value="1">
Yes </td>
<td>$
<input type="text" size="10" name="textField3"
onBlur="calculator(­'Matching', 1)"></td>
</tr>
<tr>
<td><select>
<option selected>Select Funding Source</option>
<option>Funding Source 1</option>
<option>United Way</option>
<option>Red Cross</option>
</select>
</td>
<td><input type="checkbox" name="Matching4" value="1">
Yes </td>
<td>$
<input type="text" size="10" name="textField4"
onBlur="calculator(­'Matching', 1)"></td>
</tr>
<tr>
<td><select>
<option selected>Select Funding Source</option>
<option>Funding Source 1</option>
<option>United Way</option>
<option>Red Cross</option>
</select>
</td>
<td><input type="checkbox" name="Matching5" value="5">
Yes </td>
<td>$ <input type="text" size="10" name="textField5"
onBlur="calculator(­'Matching', 1)"></td>
</tr>
<tr>
<td colspan="2"><strong­>Matching Funds Total</strong>
</td>
<td>$ <input name="Matching_Fund­s" type="text" size="10"
tabindex="1"></td>
</tr>
<tr>
<td colspan="2"><strong­>Other Funds Total</strong>
</td>
<td>$ <input type="text" size="10" name="Other_Funds"
tabindex="2"></td>
</tr>
<tr>
<td colspan="3"><a href="">Add Additional Funding
Sources</a><br>
</td>
</tr>
</table>
</form>
</body>
</html>

Optionscomment 23 answer | Add comment
Thursday, 14 December 2006
Node Replacement without HTML tags & empty responseXML Anand 21:50:52
 
The situation is; I receive a response back from the server which is
only a part of html code. e.g. a table like <table>
<tr><td>high</td></­tr>........ </table>. In other words, I receive a
file as a response which has a part of html file.

My aim is to replace an existing document node with the new response.

If I run the following lines (JavaScript):

var parsedText = document.createText­Node(req.responseTex­t);
body.replaceChild(p­arsedText, toReplace)

It replaces the node 'toReplace' with html codes with the tags included
which is not what I want. The html tags are not wanted but should
display in correct format as specified by html (a tabular form if html
tag is <table>)

If I try:

alert(responseXML);­ (its blank.... nth gets displayed in the alert
message)
var parsedText = document.createText­Node(req.responseXML­);
body.replaceChild(p­arsedText, toReplace); (it replaces toReplace by
"[object]" in IE6)


Any kind of help will be appreciated.

Anand


--
Anand
-------------------­--------------------­--------------------­-------------
Anand's Profile: http://www.highdots­.com/forums/member.p­hp?userid=72
View this thread: http://www.highdots­.com/forums/showthre­ad.php?t=1239469

Optionscomment 5 answers | Add comment
Wednesday, 6 December 2006
table rows Jean Pierre Daviau 16:55:52
 Hi to every one

for (var j = 0; j < oneTBody.rows.lengt­h; j++) {
oneTBody.rows[j].heigh­t = 300;
}
Can all the rows be setted in one shot with a propertie similar to this?

oneTBody.rows.heigh­t = 300;


Thanks for your attention.

Jean Pierre Daviau
--
Easyphp1.8
Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
http://www.jeanpier­redaviau.com


Optionscomment 5 answers | Add comment
Friday, 10 November 2006
IE7 Douglas Crockford 17:13:17
 "There is only one thing standing in the way of realizing the potential
of Internet infrastructure: the concerns over trustworthy computing,"
said plucky Bill Gates in his opening keynote at the RSA Conference in
San Francisco. "This is the top priority for Microsoft, and it will
remain our top priority," said Gates, ironically.

And so Gates announced that the long dreaded Internet Explorer 7 will
ship this summer. Previously it was scheduled to ship with the Longhorn
operating system in 2006, but that product seems to be stuck in the
muck, and the real immediate costs of insecurity are vast.

As developers, we have greatly benefited from the stability that was
realized when Microsoft stopped shipping new browsers. When Microsoft
innovates, they pump massive quantities of new bugs into the web. I hope
it is different this time, that Microsoft has learned its lessons and
will never again ship crap. We shall see.

http://www.crockfor­d.com/javascript
Optionscomment 25 answers | Add comment
Friday, 20 October 2006
HTML Form question vbMark 13:54:18
 On my form I have a text input box.
There are also radio buttons.

I need to take the value of the input box and the value of the selected
radio button and concatenate them with a plus sign in between.

So if the input box's value is: "Hello"
and the input box's name is name=step1
and the radio button's value is: "David"

I want the output to be:

step1=Hello+David

with the plus sign between them.

How can I do this?

Thanks!
Optionscomment 5 answers | Add comment
Friday, 6 October 2006
Can a reg ex. be embedded within getElementById()? romeogq 11:34:56
 Can a reg ex. be embedded within getElementById()?
Can't get it to work.

Something Like: I 'm trying to get all the element id's that do not match the regular expression to disappear.
('i' is looped, color from select statement)
document.getElement­ById("st"+i+"_"+/!$b­lue/).style.display = "none";
I want the previous line to erase all but the 'blue' div's.

Elements like:
(colors are from database)
<div id="st1_red">..cont­ent..</div>
<div id="st2_red">..cont­ent..</div>
<div id="st3_white">..co­ntent..</div>
<div id="st4_white">..co­ntent..</div>
<div id="st5_blue">..con­tent..</div>
<div id="st6_blue">..con­tent..</div>
<div id="st7_red">..cont­ent..</div>

Any help will be appreciated.
Optionscomment 2 answer | Add comment
Wednesday, 13 September 2006
textbox Vagos 00:07:39
 Can someone please, tell me how to check the value of a textbox in a form,

1, the value must be only a positive number ( not 34ax43) , for input a
stock number of product
2, the value must be positive komma and two digits max (eg 150,20) , for
input price value


Thank you,
Vagos
Thessaloniki
Greece


Optionscomment 6 answers | Add comment
Friday, 8 September 2006
fso question. Guest 05:41:08
 a simple question.

how can i get the path of the html that on browser now?

i think default fso path is "c:\document~~\usrn­ame\background".

i noticed relative path "." means there always. doesn't care what html
file i see which is

in another path like "c:\test".

i want to get the path the current html is in.

Optionscomment 5 answers | Add comment
Thursday, 24 August 2006
JavaScript object destructor method ??? Eli 19:20:14
 Hi,

Is there any way that I can define a destructor for an object in
JavaScript that will be called automatically when object is discarded?


<script type="text/javascri­pt">
MyOBJ.prototype=new­ Object();
MyOBJ.prototype.con­structor=MyOBJ;
function MyOBJ()
{
alert('Constructor!­');
}
MyOBJ.prototype.des­tructor=function()
{
alert('Destructor!'­);
}

var my_obj=new MyOBJ(); //<-- will show 'Constructor!'
delete my_obj; //<-- will show 'Destructor!'
</script>


-thanks in advance, Eli

Optionscomment 6 answers | Add comment
Wednesday, 23 August 2006
javascript submit problem : form won't submit Joop 10:06:28
 Hi all,

I'm kinda new to JavaScript, but hey... I'm trying anyway! ;-)­

So, here's my problem :

I've created a table in my document, presenting a list of items, one
can 'select' by clicking on it... (Kinda like a menu, you make your
choice from) But since this table can get very long, I've put
something of a 'search-form' on top, which enables the user to make a
selection of products from the list.

Now, the form uses a "post" method, and submits to itself, using the
form action. Some PHP script will make sure that the form is filled
out already, the next time it's presented.

The table, containing a list of products is presented, below the form.
When a user clicks on a product, the product should be "selected". At
first i just used a <a href="zoeken.php?pr­od_id=24"> link to do this,
but the problem is that my form won't remain in tact.

So now, the global idea is to submit the form after setting a hidden
form-field using JavaScript, using a onClick event.

Here's my code :

<-- the script -->

<head>
<script language="JavaScrip­t">
<!--
var old_Color;

function select_this(id)
{
old_Color = document.getElement­ById(id).style.backg­roundColor;
document.getElement­ById(id).style.backg­roundColor = '#FFCCCC';
}

function deselect_this(id)
{
document.getElement­ById(id).style.backg­roundColor = old_Color;
}

function submit_this(id)
{
document.forms['zoeken'].sele­ct_id.value = id;
document.forms['zoeken'].subm­it();
}
-->
</script>
</head>

<body>

<-- the form -->

<form name="zoeken" action="zoeken.php"­ method="post" style="margin:
5px;">

<-- a very long form with a lot of variable goes here -->

<input type="submit" value="Zoeken" class="formulierkno­p">
<input type="hidden" name="select_id" value="">

</form>


<-- the tablerows, in the table, all look like this -->

<tr id="1" onClick="submit_thi­s(1);" onMouseOver="select­_this(1);"
onMouseOut="deselec­t_this(1);" style="cursor: hand; background-color :
'transparent';">

</tr>


Cool huh?!? Everything seems to work, but the submit function. Did I
do something terribly wrong?!? I probably did... :-(­

WHY WON'T MY FORM SUBMIT WHEN I CLICK ON A TABLE-ROW?!?!?!?!? :-S

Thnx in advance to everyone spending time on this! ;-)­
Optionscomment 6 answers | Add comment

Add new topic:

How:  Register )
 
Login:   Password:   
Комментировать могут: Премодерация:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Javascript web-programmingGo to page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

see also:
php-win.exe - when to use
OpenSSL in Win32
Installation Woes.
see also:
Strange result returned from Oracle
PHP_JAVA.DLL
PHP5/IIS/ISAPI/MySQL hang
see also:
ereg_replace help wanted
Commas conundrum
ORIG_SCRIPT_NAME

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
You can find the help and FAQ in the Admin's blog.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .