627 Posted Topics
Re: [CODE] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <script type="text/javascript"><!-- function insertAfter(parent, newNode, referenceNode) { parent.insertBefore(newNode, referenceNode.nextSibling); } window.dynamicNodeCount=0; function addElement() { window.dynamicNodeCount++; var dad = document.getElementById('container'); var elementAboveNew = document.getElementById('sib1'); var newElement = document.createElement('div'); newElement.innerHTML="Element " +window.dynamicNodeCount; insertAfter(dad, newElement, elementAboveNew); } //--></script> <div onclick="addElement();">Add Element</div> <div id="container"> <div id="sib1">a</div> </div> … | |
Re: read through the comments: [CODE=asp] <% 'NO! Use Server.MapPath() to determine the full path of the db 'you do not need to do all these ' 'sFile = request.ServerVariables("PATH_TRANSLATED") 'sSplit = split(sFile, "\") 'for iCtr = 0 to uBound(sSplit) - 1 ' sDir = sDir & sSplit(ictr) & "\" 'next … | |
Re: <% On Error Resume Next Dim sConnection, objConn , objRS sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username;PASSWORD=mysql_password; OPTION=3" Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open(sConnection) If Err.Number <> 0 Then Response.Redirect "maintenance.asp" Response.End Else 'continue coding here '... objConn.close Set objConn=Nothing End If %> | |
Re: [QUOTE] well for example if i type in "po" it should give me all possible definitions such as police and pocket but instead it gives me definition for police and just word pocket where it shouldn't even return "word" it should only return definition. [/QUOTE] The problem is that when … | |
Re: [QUOTE]in my loop i am calling $total [/QUOTE] Not sure what kind of loop you have(for, while,...), but for illustration purposes, the code below uses a while [CODE] //initialize the variable outside the loop $total=0; //assuming I am retrieving data from a DB query result //where one of the columns … ![]() | |
Re: [QUOTE] and next to each row I have a submit button that when pressed will send out an email to all the users [/QUOTE] Did you mean that if you click on the "Send Mail" button for a row, an email should be sent only for the person on that … | |
Re: [CODE=php] $str = '<div class="right"><a id="ctl111_contestProfileLink" href="http://contests.covers.com/Sportscontests/profile.aspx?user=265839&sportid=0">Picks History</a></div>'; preg_match('#user=(\d+)#',$str,$m); echo "User is: " . $m[1]; [/CODE] | |
Re: On your original post you are infact missing a space to the left of the WHERE keyword. My suggestions would be to use "&" instead of "+" symbol to concatenate the strings and enclose the table/fieldnames in brackets. On another note, with regards to: [CODE]UPDATE passwrd[/CODE] Are you sure your … | |
Re: [quote]The problem is that the page does not reload a different URL when you refresh the page[/quote] that's because on every reload, the code executes again from the top, like it is the very first time it is executing. You need to "maintain" state across refreshes. For this you will … | |
Re: [QUOTE]window.load(function(){...});[/QUOTE] are you actually using window.load??? Perhaps you meant [ICODE]window.onload?[/ICODE] Other than that, I don't see the need to use window.onload directly. If on line 1 you set up a window.onload call and then later on line 100 you do so again, you may be overwriting the "scheduled" event from … | |
Re: I modified the code above slightly and works bor both, IE and FF. If the problem persists, it could be a browser version issue (as opposed to the browser family). Notice that instead of using document.getElementById, I am passing a reference to the object directly. This way you can reuse … | |
Re: [QUOTE]how to escape passing value through url during pagination[/QUOTE] you need to use the urlencode() function immediately before you create the pagination links: [url]http://us3.php.net/manual/en/function.urlencode.php[/url] [QUOTE]it there any way to use pagination without using pasing parameter in url[/QUOTE] what you can do is see if your search box field is NOT … | |
Re: when you have more than one form element with the same name (in your case you have two radio buttons named radChoice) you then need to treat it as an array. So in your case, on what you posted instead of: [code]if (form.radChoice.value == "S"){...}[/code] you needed: [code]if (form.radChoice[0].value == … | |
Re: [code=php] $connection=mysql_connect("localhost","username","password") or die(mysql_error()); mysql_select_db("databasename") or die( mysql_error()); $result = mysql_query("Select field1,field2,... from Table") or die(mysql_error()); if( !mysql_num_rows($result) ) { echo "No records found"; } else { $row=mysql_fetch_assoc($result); /* here $fieldNames is an array that contains the field names of the records returned by your query */ $fieldNames = array_keys($row); … ![]() | |
Re: [CODE=javascript] var testString = "1,Jeremy,130,80;2,Lauren,370,300;3,Jeancarlos,200,200;4,Luke,330,70;5,Bloom,392,108"; var testArray = testString.split(";"); for(var i = 0, limit=testArray.length; i < limit; i++) { testArray[i] = testArray[i].split(","); } [/CODE] | |
Re: [QUOTE]I am still receiving the error I posted originally. [/QUOTE] are you saying that the "result" you get is actually the PHP code you wrote to do the searching? If that is the case, then your server is not configured to execute php. You need to search online for tutorials … | |
Re: Go to: [url]http://www.quirksmode.org/js/cookies.html[/url] scroll to the section titled "The scripts". Grab the three functions in that section and save them to a file named cookies.js. It should be clear how to use those functions. | |
Re: refer to the first example at: [url]http://us3.php.net/manual/en/function.mysql-fetch-field.php[/url] | |
Re: Where is your implementation for saveUpdateCodes? My guess is that your bug is in that function. | |
Re: What exactly are you trying to do. The email code does not make sense. The only bug on your code that imports the csv information is that it never writes the last line of the csv file to the browser. You need to change: total_num_imported=ubound(total_split_text) to: total_num_imported=ubound(total_split_text)+1 Here is how … | |
Re: on line 17 of your original post, change: [CODE=php] <? [/CODE] to: [CODE=php] <?php [/CODE] Alternatively, you can enable short tags in your php.ini file. You will need to change: short_open_tag = Off to: short_open_tag = On | |
Re: [CODE=javascript] var siblings=[] for( var i=0, limit=document.images.length-1; ++i) { if( document.images[i].parentNode===document.images[i+1].parentNode) siblings[siblings.length]=i; } alert( siblings.join("\n") ); [/CODE] | |
Re: Use the RegExp contructor. It accepts two arguments: 1. the regular expression pattern 2. reg ex options (g=global, etc) [code] var _regex = new RegExp( "^" + _inputText.value, "i"); [/code] NOTE: If your expression were: [code]var x = /^\d+$/ig[/code] if you use the RegExp object you will need to escape … | |
Re: you are passing only three parameters. For post, your third parameter should be only the php script that processes the request(without the querystring parameters) and the fourth parameter should be the "querystring" data. Try: [code] send_to_host('humbot.freewebhostingpro.com','POST','/index.php','a=5'); [/code] | |
Re: should be: [code] btn.onclick = doSomething; [/code] | |
Re: >>is this feasible? yes. make an ajax request to the "main" page and if you get the "main" page then redirect. If you are not familiar with ajax, refer to the following: [url]http://w3schools.com/ajax/ajax_intro.asp[/url] On another note, if I went to your site and it's "closed", I would just leave - … | |
Re: [code] case 10: //1. use mysql_real_escape_string to avoid sql injection attacks //2. if you actually meant to assign values, you do NOT need an if $uid=mysql_real_escape_string($_GET['u']); $pid=mysql_real_escape_string($_GET['p']); $t=mysql_real_escape_string($_GET['ti']); $type=mysql_real_escape_string($_GET['typ']); //you can check if at least one of the values were empty as follows if( empty($uid) || empty($pid) || empty($t) || … | |
Re: once the page has finished loading, if you call document.write you "destroy" the current document, and a new document will be created containing the new content you are writing. In your case, the "cellClicked" function exists in the original/old document (before document.write is executed), but since you call document.write via … | |
Re: try: [code] ... function loadURL(url) { mygetrequest=new ajaxRequest(); ... } [/code] | |
Re: set the time limit on your script to zero so that your script doesn't timeout. [url]http://us.php.net/set_time_limit[/url] | |
Re: in PHP you use a period to concatenate/join strings: [code] $stringData = $myname . ": ". $mymessage . "\n"; [/code] | |
Re: You will need to give full control to the Folder where the file resides to the IUSR_<machineName> (Where machine name is the name of your computer) user account. | |
Re: refer to the makePOSTRequest on the following page: [url]http://www.captain.at/howto-ajax-form-post-request.php[/url] | |
Re: you cannot call the function directly. You need to call a server-side script an pass arguments to the script. Then process those arguments and do whatever you need to do depending on the values of said arguments - ex: [code] <a href='fileRemover.asp?id=3'>Test.txt</a> [/code] then in fileRemover.asp you check a "lookup … | |
Re: on what you posted, you need quotes around the email addresses: [code] myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" [/code] Also, this is not right: myMail.Sendset The "Set" should be on the start of the next line: [code] myMail.Send Set myMail=nothing [/code] >>uploaded this script (as an .asp file) on a free asp-supported remote server … | |
Re: try this for tabs.htm: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Tab Demo</title> <link rel="stylesheet" href="manage.css" type="text/css" media="screen"> <script type="text/javascript" src="manage.js"></script> <script type="text/javascript"> window.onload=start; function start(){ initTabs('data',Array('Menu'),0,100,100,false); } </script> </head> <body> <form id="editor" method="post" action="?&"> <div id="data"> <div class="dhtmlgoodies_aTab"> <h1>Admin Area</h1> <hr /> <p class="cmsSiteMap"> … | |
Re: on line 34 of the code you posted you are NOT checking to see if the request has completed. The iteration portion of the code you posted looks right, but when you make an ajax request, the onreadystatechange fires multiple times. You need to call your update function only when … | |
![]() | Re: try: [QUOTE] ... case 'param2': this.target=""; targetURL="http://www.google.com"; break ... [/QUOTE] |
Re: [CODE] SELECT idpersona, Max(idcategoria) as categoria, Max(datapagamento) as pagamento, Max(datascadenza) as scadenza FROM personacategoria WHERE NOW( ) BETWEEN datapagamento AND datascadenza GROUP BY idpersona ORDER BY idpersona [/CODE] | |
Re: refer to the demo on the following link: [url]http://digitalbush.com/projects/masked-input-plugin/[/url] | |
Re: We cannot guess what you are looking at. Please revise your problem description and provide details. | |
Re: In your inner if you have this: [CODE]a[i].document.getElementById('td').innerHTML='<div class="js-kit-comments" permalink=""></div>'; && ...[/CODE] which is doing assignment(single equal sign), not testing(two equal signs). Furthermore, that semicolon should be giving you errors. I believe it should be: [CODE]if( a[i].document.getElementById('td').innerHTML=='<div class="js-kit-comments" permalink=""></div>' ...[/CODE] | |
Re: Open the properties window for the website in question ( the fifth image from top to bottom on the step-by-step tutorial at [url]http://www.razorx.com/tutorials/IISonXPPro/)[/url]. Then click on the "Home Directory" tab. Make sure that "Execute Permissions" is set to "Scripts Only" at the very least. If after this, the problem persists, … | |
Re: If your fields have names such as "input[]", you do not need to provide any numbers inside the brackets. That naming convention (adding brackets at the end of the field name, is necessary for PHP processing, but on the client-side, those brackets are part of the name). Refer to the … | |
Re: It sounds like you are using an automatic pop-up that gets triggered AFTER all the thumbnails are loaded. It that is the case, then perhaps you should consider calling the popup after the first or second or third etc., image is loaded instead of waiting for all of them to … | |
Re: From your problem description it is not clear if you have a select list within a div ( or some other element) with id="ChtPlc". At any rate, the following code should do what you are aiming if your HTML code is similar to the following: [CODE] <div id="ChtPlc"> <select onchange="getInfo();"><option … | |
Re: Try this: [CODE] $sql="SELECT * FROM users WHERE username='" . $myusername . "' and password='" . $mypassword . "'"; $result=mysql_query($sql); $info = mysql_fetch_array($result, MYSQL_ASSOC); // If result matched $myusername and $mypassword, table row must be 1 row if(count($info)==1){ if ((int)$info['verified'] == 0) { $url = "notverified.php"; $redirect = "other"; } … | |
Re: Try this: [CODE] <script> <!-- var counter=0; //specify random links below. You can have as many as you want var randomlinks=new Array() randomlinks[0]="http://mysite/page/file" randomlinks[1]="http://mysite/page/file" randomlinks[2]="http://mysite/page/file" randomlinks[3]="http://mysite/page/file" randomlinks[4]="http://mysite/page/file" function randomlink(){ window.location=randomlinks[counter]; counter = (++counter)%randomlinks.length; } //--> </script> [/CODE] | |
Re: For the sake of clarity, let me start out with a couple of examples. If you were to navigate to: [url]http://www.somesite.com?name=John[/url] the browser contacts that server and sends data without encrypting it(cookies, url parameters, etc). On the other hand if you navigate to: [url]https://www.somesite.com?name=John[/url] the browser will encrypt the data … | |
Re: The best approach is to have the DB enforce Referenctial Integrity. Basically you instruct the database at design time NOT to allow duplicates for certain records ever. IF such an attempt is made, the db server will not carry out the operation. Look at these: [url]http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=Referential+Integrity+in+Oracle&spell=1[/url] |
The End.