Rune Thandy
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Rune Thandy
-
-
I still can't get it to work like you suggested, but I finally got to a different solution which worked fine for me.I got back to including the js file in the beginning of the webpage and in the js file I got the following code now:document.forms[page_form].elements[page_element].focus()But thanks for trying to help me.
-
It gives an error when it loads the page now."Object expected"On the line: set_focus(....) in the webpage.
-
It goes something like this:This is the webpage<html><head><script language="javascript"><%@include file="/include/check_shewart_page.js"%>.........</script></head><body><form name="listmenu0" action="....." id="mp" method="post"><table><tr><td><input type="text" id="datefield1" name="datefield1" tabindex="1"></td><td><input type="text" id="datefield2" name="datefield2" tabindex="2"></td></tr><tr><td><input type="text" id="datefield3" name="datefield3" tabindex="3"></td><td><input type="text" id="datefield4" name="datefield4" tabindex="4"></td></tr></table><script>set_focus("listmenu0","datefield1")</script></body></html>The js file:function set_focus(page_form,page_element){document.page_form.page_element.focus()}When I change page_form in listmenu0 and page_element in datefield1 it works.The webpages are longer, but this is essentially what it's about.
-
Yes, the link works fine.When I put in the right name of the form and element it works, but when I try to make it dynamic it goes wrong.
-
I know that bit about putting the function in the webpage at the end.My problem is: the function in the js file doesn't work and I don't know how to get that right.
-
I would like to make a js file which sets the focus on an element in a form.But it has to work from different webpages.So in the webpage it should look something like this:<script>set_focus(form1,element1)</script>And in the js file it should look something like this:function set_focus(page_form,page_element){ document.page_form.page_element.focus()}I know from experience that this doesn't work, but I don't know how to get it right.Can somebody help me?
-
It's not exactly how I'd like it, but I'll give it a try.
-
I’ve got two different forms on a page and I’d like to make two print buttons at the bottom of the page.One to print the first form and the other one to print the second form.How do I do this?
Column question
in SQL
Posted
I've got a table which goes something like this:
When I want to make a select statement I know which column has "Charge", but I don't know where "BPU" is. This can be in a different column each time.How can I make a select statement to find out in which column the "BPU" value is. Something like: select (something) where id='123'I want to fit it into a webpage, but I have to get the right select statement first.I pick up the "Charge" column from the page and want to set the first two digits from the accompanying column (e.g. label2/usertext2) in the column where the "BPU" is.This is probably not very clear, but it's a bit difficult to explain.So if you need further information to help me, please ask, because I really need some help here.