279 Posted Topics
Re: Right... Your extensive code really gives the impression you worked very hard on it... You should check out some tutorials on AJAX: [URL="http://www.google.com/search?q=ajax+tutorial"]http://www.google.com/search?q=ajax+tutorial[/URL] The top 5 explain everything. ~G | |
Re: You can easily ask the user whether he wants to submit the form or not: [CODE]<form method='post' action='' onsubmit='return confirm("Are you sure you want to submit this form?");'>[/CODE] The confirm() returns true if the user selected "yes" and false if the user selected "no". ~G | |
Re: I hope you set the variable $id in code you have not shown yet, and cleaned that with htmlentities() and addslashes(). If you are counting on register_global of PHP, you are creating a huge security leak. Well anyway, to solve your problem, you first need to select the row, check … | |
Re: See the following link: [url]http://www.phpriot.com/articles/images-in-mysql[/url] ~G | |
Re: You got to be kidding me, these type of effects are not possible in JavaScript. I know jQuery has alot of reasonably good functions, but no where near that. If I am wrong, correct me and send me a link to where I am proven wrong. ~G | |
Re: Well the AJAX is completely wrong ;) , let me explain how AJAX works: - You create a XMLHTTP request object - You define a function that is triggered when the readystate is changed of the XMLHTTP object - You open a url using the XMLHTTP object - You send … | |
Re: At first view, the code looks alright. You should place alerts everywhere in your javascript code. Also I would recommend you use the GET method, as POST method is a bit more difficult. So try out this function: [CODE]function predeployment(id) { var ajax = false; // Create the object: // … | |
Re: You know, [URL="http://www.google.com/search?q=print+images+javascript"]Googling[/URL] isn't that difficult, 2/5 top five give a solution: [URL="http://www.webdesignforums.net/javascript_ajax_json_6/javascript_command_print_image_30898.html"] http://www.webdesignforums.net/javascript_ajax_json_6/javascript_command_print_image_30898.html[/URL] [URL="http://www.webdeveloper.com/forum/showthread.php?t=178631"]http://www.webdeveloper.com/forum/showthread.php?t=178631[/URL] ~G | |
Re: Perhaps you should use properly write your programs, instead of scrambling it up, putting everything right next to eachother? Use more enters to seperate each line. No one will voluntairly read through someone else's code which is poorly written and try to figure out what the hell he is trying … | |
Re: Try [URL="http://www.google.com/search?q=sliding+javascript+dropdown"]googling[/URL]? There are plenty of links out there (with explaination)... [url]http://www.leigeber.com/2008/04/sliding-javascript-dropdown-menu/[/url] ~G | |
Re: You can not open a .js file in your browser. You need to link it to a HTML file by using: [CODE]<!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>My first page with JavaScript</title> <script type='text/javascript' src='scripts/MyScript.js'></script> </head> <body> </body> … | |
Re: Well, you can make it browser specific: [CODE]<script type="text/javascript"> if (navigator.appName == 'Microsoft Internet Explorer') { // Only for IE (that poorly made and pathetic little browser): var counter = 0; window.onresize = function (){ if (counter == 1) { alert("Thanks for resizing!"); counter--; } else { counter++; } } … | |
I need to create a row and its content to be unchangeable and undeleteable, as a secure way to ensure that the administrator will always have access to the website. Does anyone have any idea how to do this? A Google Search gave no results, but perhaps someone knows how … | |
Re: Although I do not have any experience with Rotating ad banners, I do see the cause of your problem: >> Line 6, 7, 8 - It is a mix of various quotes and they are aligned wrong. Use the following: [CODE]textads[0] = "<a href=\"http://www.leighfibers.com\" target=\"_blank\" onClick=\"javascript: _gaq.push(['_trackPageview', '/bannerad/leighfibers']);\" ><img src=\"http://www.sleepproducts.org/ISPANEW/images/bannerads/August_LeighFibers.jpg\" … | |
Re: Thats fairly easy: [CODE]<script type='text/javascript'>window.onload=function(){ update(document.getElementById('qty')); }</script>[/CODE] You should place this beneath the form HTML, so that the id already exists. ~G | |
Re: line 21 - You put pans at 1 every time the loop is repeated. ~G | |
Re: it needs to be: [CODE]<script language="JavaScript" type="text/javascript"> function goTo() { document.location.href="subscribeJ.asp"; } window.onload=function(){ setTimeout(function(){ goTo(); },10000); } </script>[/CODE] and the body should just be: [CODE] <body>[/CODE] ~G | |
Re: 1) I (and I think nobody) will read through all your code 2) There is a mail() function in PHP: [url]http://php.net/manual/en/function.mail.php[/url] 3) The mail() function only works if there is a mail system on your server/computer 4) If you still want to use the code you posted above, I would … | |
Re: You just simply have a table, which only consists out of one row and some columns that represent settings: CREATE TABLE settings ( accept_all_citizenship CHAR(3) DEFAULT "yes", ud_not_citizenship LONGTEXT, ... And some other cols.... And just simply update that with the values returned from the form. Note that the names … | |
Re: [CODE]if (isset($_GET['id'])) { $id = $_GET['id']; } else { $id = 1; }[/CODE] ~G | |
Re: You are confusing PHP with JavaScript. I think you want to change the content of the textarea, depending on what option is selected. I think you want something like this: [CODE]<script type='text/javascript'> function ChgBox(number) { var thecontent = document.getElementById(number).innerHTML; document.getElementById('content').value = thecontent; } </script> <select onchange='ChgBox(this.value);'> <option value='1' >Your comment … | |
Re: That is not really difficult, and pretty funny someone "copyrighted" this piece of extremely difficult code. Anyways, you can change the contents of a div by adding an ID to it and then calling it with document.getElementById(). Example: [CODE]<script type='text/javascript'> function ChangeMyDiv() { document.getElementById('MyDiv').innerHTML = 'This is some other text!'; … | |
Re: It's either AJAX or you need to submit a form with the value as a hidden input. ~G | |
Re: You added an excessive " and an extra return false [CODE]<a href="mar2010.html" onclick="load('tracklists/mar2010.html','prototype_trk');return false;" "load('bg_feb.html','bg_image');return false;">[/CODE] needs to be [CODE]<a href="mar2010.html" onclick="load('tracklists/mar2010.html','prototype_trk'); load('bg_feb.html','bg_image'); return false;">[/CODE] ~G PS: There is not a single piece of jQuery in your code. | |
Re: It should work, seeing your code. Perhaps change the name of the input to "submitbutton' to avoid complications, also do not use the alt attribute. If that doesn't work, perhaps you should use the following: [CODE]<form method="post" name='BidForm'> ... The rest of the table... <img src='images/console_button_place_bid.gif' alt='Place Bid' onmouseover='this.style.cursor="pointer"' onclick='document.BidForm.submit()' … ![]() | |
Re: >> Line 34 - there is no declaration of the function showHint >> LIne 34, 35, 37 - you forgot to end with a ; >> Line 27 - use <script type="text/javascript"></script> ~G | |
Re: Your code seems fine, except for the fact that there does not exist a div with the id 'contentArea'. There are 2 things why your script might not work: 1. The script is not included. Use: [CODE]<script type="text/javascript" src="myAjaxFunction.js"></script>[/CODE] 2. The page is not executed on a server. The thing … | |
Re: I like the idea, however this is extremely hard to achieve: >> The user needs to have software installed on his computer, capable of making the type of fingerprint you want (color, resolution etc.) >> You need to be able to get the image from the user, this is fairly … | |
Re: I personally don't like regex, as it takes alot of processing time and it's syntax is very difficult. You can better use a own written function that just simply loops the string, checking each character whether you want it in or not: [CODE]function checkString(var string) { var stringlength = string.length; … | |
Re: You are making a list that has: >> A column with the transaction name >> A column with the type >> A column with the positive amount >> A column with the negative amount >> A column with the date and time of the transaction >> A column with a … | |
Re: A thread about playing music already exists on DaniWeb: [url]http://www.daniweb.com/forums/thread71948.html[/url] ~G | |
Re: Perhaps [URL="http://www.google.nl/search?q=read+a+directory+php"]google[/URL] a bit? You can read a directory easily using PHP: [url]http://php.net/manual/en/function.readdir.php[/url] ~G ![]() | |
Re: Select the database in the dropdown -> export tab -> Start button -> Depending on the options you selected phpmyadmin will return a sql file or you see it in a textarea. ~G | |
Re: It is possible you have not specified a email from which it can be sent, check php.ini at the section of mail options. This problem does not occur on servers, because on most servers the server also has a mail-server. ~G | |
Re: As far as I could see, there does not exist a counter folder in which a count.db exists. So create a folder named "counter" and create a file in that named "count.db" ~G | |
Re: You first check whether a responsetext is returned before you even sent the request! Also the $MSG will always be empty, as you do not send any post-data with your request. | |
Re: I assume you are using javascript-based dropdowns? Well you need to write a function that is called every time the dropdown-box is changed that loads the content of the dropdown depending on the value: [CODE] <select name="myDropDown" id="myDropDown" onchange="LoadDropdown(this.value)"> <option value="1" selected="selected">1</option> <option value="2">2</option> </select> <div id="Dropdownmenu"> Subject A<br /> … | |
Re: If you only want the form to be submitted from your page, you can use an ID, which is formed out of the current date and some other variables, that is send with the form. ~G | |
Re: You can force a download, however you will need to press a "Download"-button for it to be downloaded and openend (depending on your browser settings). Forcing a download using php (you will have to reload the page every half an hour, i suggest using [url]http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm[/url] ): [url]http://elouai.com/force-download.php[/url] ~G | |
Re: When a page loads, no form will be automatically submitted. You should check whether the PHP-script also performs a action if no values are submitted (if $_POST is empty) and stop it from doing if that is true: [CODE]if ($_POST['search_words'] != "") { // ... Query the database etc... }[/CODE] … | |
Re: Contact the writer of the scripts you are using or the reference manual. | |
Re: For the admin panel, you should use a code editor, not a wysiwyg editor, as you can not use bold text in a script, it is just plain text. But anyway, most wysiwyg editors are an extension of a textarea, and can be accessed like every form element. Please note: … | |
Re: A few things I noticed: >> You added no comments in the code to what you are trying to accomplish >> Your usage of braces is a bit confusing, there are two ways you can properly use braces: [CODE]if (...condition...) { ...Do something... }[/CODE] or [CODE] if (...condition...) { ...Do … | |
Re: This will work: [CODE]<?php $user_ip = $_SERVER['REMOTE_ADDR']; include("sec/db.php"); $query = "SELECT * FROM blog_name WHERE ip='".$user_ip."'"; $result = mysql_query($query) or die("Could not execute query"); if ($row = mysql_fetch_array($result)) { //.... Do something.... } ?>[/CODE] ~G | |
Re: Making a code editor is a very difficult task. The problem is that regular textarea's do not allow html to be executed within their text/value, however this can be bypassed but I could not find out how. A graduee at MIT (if I am not mistaken) has made a richt … | |
Hey everybody, I am currently having difficulty using GetOpenFileName() and GetSaveFileName(). The keeps returning the error " undefined reference to `_GetOpenFileNameA@4' ". I can't seem to find a fault in my code, so is it the compiler or is it the code? I am using CodeBlocks. [CODE]void DoFileOpen(HWND hwnd) { … | |
Re: Your code works. Only you need to use "checked" as a value for the attribute "checked", as this is the only valid value. [CODE]<script type="text/javascript"> function checkAll(checkname, exby) { for (i = 0; i < checkname.length; i++) checkname[i].checked = exby.checked ? "checked" : ""; } </script> <form name="form2" method="post" action="?action=evaluate"> … | |
Re: There are 2 options: >> You can either search for a script using [URL="http://www.google.nl/search?q=lightbox+script"]Google[/URL] >> Or make your own lightbox script, it justs needs to do the following things: --------> Center the div in which the form stands (you can ofcourse make the div look good) --------> Change the transparancy … | |
Re: I guess this is a homework assigment? Well I will tell you how you can do it, but I will not write the code for you. 1. Create the document with the table (it needs to have a id attribute) 2. Write a function in JavaScript that calculates the powers … ![]() | |
Re: As far as I can see your are pretty close to finishing this. You should check the following things: A) Is the table correctly printed B) Are the options for difficulty and level select printed properly C) Does the function validate_fields() work properly If the above are all good, you … |
The End.