Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide/unhide label in IE
Message
 
To
08/12/2015 12:31:36
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628643
Message ID:
01628661
Views:
55
>>>i have not done any web stuff in years and I forgot to dynamically hide/unhide a label in IE hosted in an vfp form
>>>
>>>after pressing the submit i capture the values in navigate2 and want to mak a message sayin 'Data Saved' on the IE form
>>>
>>>
>>>I know Rick does it in wwconnect.
>>>
>>>I can't find it anywhere in the docs
>>>
>>>getting old!!
>>>
>>>P
>>
>>I would use Javascript for that ;-)
>
>how would you do that
>how do you call JS from vfp?
>this is what i googleed"
>how do I toggle the display
>
>i want to show a message in this line (invisible at the beginning)
>
><input class="inputbox" name="dept-input" type="text" id="dept-inputbox" />
>
>
>
>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
><html xmlns="http://www.w3.org/1999/xhtml">
>
><head>
><meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
><title>Untitled 1</title>
>
><script type="text/javascript">
>/* code from qodo.co.uk */
>// create as many regular expressions here as you need:
>var digitsOnly = /[1234567890]/g;
>var integerOnly = /[0-9\.]/g;
>var alphaOnly = /[A-Za-z]/g;
>
>function restrictCharacters(myfield, e, restrictionType) {
>	if (!e) var e = window.event
>	if (e.keyCode) code = e.keyCode;
>	else if (e.which) code = e.which;
>	var character = String.fromCharCode(code);
>
>	// if they pressed esc... remove focus from field...
>	if (code==27) { this.blur(); return false; }
>	
>	// ignore if they are press other keys
>	// strange because code: 39 is the down key AND ' key...
>	// and DEL also equals .
>	if (!e.ctrlKey && code!=9 && code!=8 && code!=36 && code!=37 && code!=38 && (code!=39 || (code==39 && character=="'")) && code!=40) {
>		if (character.match(restrictionType)) {
>			return true;
>		} else {
>			return false;
>		}
>		
>	}
>}
>
>function toggleDisplay(id, displayvalue)
>{    
>    if ( displayvalue == "others" ) {
>         document.getElementById(id).style.display = 'block';
>    } else {
>         document.getElementById(id).style.display = 'none';
>    }
>}
></script></head>
>
><body>
><form method="post" action="VFPS://EVENT/">
>	
>
>	<div id="dept_input_div" style="display: none">
>	      <input class="inputbox" name="dept-input" type="text" id="dept-inputbox" />
>	</div>
>	<table style="width: 100%; height: 181px;">
>		<tr>
>			<td style="width: 140px" class="style1">Bank:</td>
>
>
>
>			<td>
>				<input name="Text1" id="txtBank" type="text" />
>			</td>
>		</tr>
>			
>		<tr>
>			<td style="width: 140px" class="style1">Account Number:</td>
>			<td>
>					<input type="text" id="txtAccount" onkeypress="return restrictCharacters(this, event, integerOnly);" />
>			</td>
>			</tr>
>		<tr>
>			<td style="width: 140px">Name:</td>
>			<td>
>				<input name="Text2" id="txtName" type="text" />			
>			</td>
>		</tr>
>		<tr>
>			<td style="width: 140px">Description:<br />
>			</td>
>			<td>
>				<textarea cols="20" name="TextArea1" id="txtDesciption" rows="2"></textarea>			
>			</td>
>		</tr>
>	</table>
>	
>	
>		<input name="Submit1" id="btnSubmit" type="submit" value="submit" />
>		
>	</form>
>
>
>
></body>
>
></html>
>
>
>
>would you have a code sample???
>
>Thanks
>
>P

What do you want to change?
And when?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform