Hello,
I have a question regarding using variables. My environment is SQL Server 2005. I know the variable is set because it only breaks the query if I use it in certain areas. Can someone point out my error?
USE SampleCode
Declare @myTableName varchar(45)
Set @myTableName = 'TestTable';
IF...
You'll need to "open" the request first(before setting header):
<script type="text/javascript">
var xmlhttp
function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest()
xmlhttp.open("POST",url,true)...
If you don't have conditions that you have to check after each
function you could create the array and then use setTimeout.
var myDel = 'f1|f2|f3';
function doFunctions(){
var tmp = new Array();
tmp = myDel.split("|");
tmp = tmp.join('();') + '()';
setTimeout(tmp, 50);
}
Thanks,
--Mark
Dave is dead on...
Change the method to "post" and it works fine.
I'm guessing that comment you're formatting is too much..
Good Job Dave.
Thanks,
--Mark
Unfortunately, I don't have time to complete the mission.
But I can pass on a waypoint:
If you comment this line it works:
function TestDataCheck(feedback) {
var pagecounter_passed = parseInt(document.uspsfeedback.pagecounter.value);
var pagecounter_passed = pagecounter_passed + 1...
This will make it work in both FF and IE:
Add these classes to your style sheet:
.hide_quote {
display: none;
}
.show_quote {
display: block;
position: absolute;
top: 18px;
left: 10px;
width: 125px;
height: 70px;
border: 1px solid #000;
background-color: #ffe;
color...
I can tell you one thing that I've run across with the
combination of IE and XMLHttpRequest is a cache issue.
Nothing may be wrong with your code, IE may be stubbornly denying the new request.
Check out this FAQ and especially the "wiki" link at the end.
AJAX
I don't see where you are setting...
This is a "working" example of AJAX and how it enables the client to "request" data from
the server without refresh of the page.
Included is a listing of helpful resources. You will need to do your own research as to
which types of "request" you will need to utilize.
mkSel.html
<html>...
Hi Slippenos,
If you notice there is no form field 'EstimateStatusB' in the above example.
That is what the first part of our 'if' does.
(Makes sure there is a form field with that name before testing the value.)
if(form.elements['EstimateStatusB'] &&
form.elements['EstimateStatusB'].value...
In this example the process goes like this:
1) tktps.html loads (includes external scripts)
2) user hits one of the buttons
3) request sent to server (ajax goes to work)
4) the script takes the response and sets the variable value and then starts the "clockUpdate()"
tktps.html
<html>
<head>...
Is there any reason you can't use the element name like so:
<script type="text/javascript">
function ckForm(form){
if(form.elements['EstimateStatus'] &&
form.elements['EstimateStatus'].value == 'Nothing'){
alert('Your Note');
return false;
}
if(form.elements['EstimateStatusB'] &&...
Do your form fields have their own id's?
Are they unique?
You are pretty close with the above attempt:
<script type="text/javascript">
var arr = ['t1','t2'];
function ckFields(){
for(var j = 0; j < arr.length; j++){
if(document.getElementById(arr[j]) != undefined)...
lungdart,
Hard to say what the problem is without seeing the code that is misbehaving.
Here are some references and an example that might help:
PHP on the Fly
Jibbering
getTime.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<script...
Maybe this will give you a start:
<?php
$str = "This is a sting with a br tag.<br />And then we have a <p> tag and a </p> tag.";
$str = str_replace("<br />", "\n", $str);
$str = str_replace("<p>", "\n\n", $str);
$str = str_replace("</p>", "\n\n", $str);
echo "<pre>";
echo $str;
echo "</pre>"...
litton1,
The body "onload" event will work for this:
<html>
<head>
<title></title>
<script type="text/javascript">
function loadImg(){
var loadedImg = new Image();
loadedImg.src = "http://www.google.com/intl/en/images/logo.gif";
var Img = document.getElementById('pic');
Img.src =...
Form's have an "onreset" event handler.
Add this to your opening form tag:
onreset="initForm()"
And this function:
function initForm(){
var trows = document.getElementsByTagName('tr');
allBoxes = 0;
for(var j = 0; j < trows.length; j++){
(trows[j].className == 'picked')...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.