743 Posted Topics
Re: [QUOTE=hunkychop;560289]using ajax to call a php fuction: [INDENT]put this where you want resutls: [CODE=html]<div id="results" style="display:inline; width:100px; height:20px;"></div>[/CODE] include this ajax library in the page you want the results to display on. [INDENT][url]http://www.codeproject.com/KB/ajax/SAL/sal_src.zip[/url][/INDENT] [CODE=html]<script type="javascript" src="path_to_ajax_lib"></script>[/CODE] create php page with your function in it and do this: [CODE=php] <?php function … | |
Re: [QUOTE=HenryForbes;549597]Help, I have a web based form containg values typed in by the user. The first value is called noItems, which is outside the form. The form contains a persons name, the number of items,noSub, thay have submitted and their final grade. I need to use noItems and noSub to … | |
Re: [QUOTE=adrumsolo4u;549815]what i am trying to accomplish is to have two elements lets say SEND and RECEIVE. when i click the element SEND i want the RECEIVE element to receive the effect. currently my script only effects the element itself: [CODE=javascript]var animElements = document.getElementById("send").getElementsByTagName("p"); for(var i=0; i<animElements.length; i++) { animElements[i].onclick = … | |
Re: [QUOTE=austind;548555]I've been working on re-designing my website, and I decided to add a javascript based slideshow to go on the front page to link to articles. I know next to nothing about scripting (XHTML/CSS is my thing). The question I have has to do with the slideshow loading incorrectly because … | |
Re: I just tried this test: [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <script> window.onload = function() { var s = document.getElementById('field[12]'); var cust_cc_exp_month = s.options[s.selectedIndex].value; // This displays the correct Value -- which is "0" for item #0 = … | |
Re: [QUOTE=kishou;549456]ok i have a iframe and i want it so that when someone clicks a link inside it it opens in the same window. not a new window. i was thinkingof using onclick but it would be too much work.[/QUOTE] Links in an IFRAME should open inside the IFRAME by … | |
Re: [QUOTE=pink_zippy_123;348150]Hi, Basically I am quite new to php but am currently connecting to a database and am trying to send data from one web page to another using the information selected in a hyperlink. The first web page contains a table populated will all options within the database e.g. if … | |
Re: Is the problem how to get let .htaccess know that the user is authorized and set this in php? I've never used .htaccess for authentication before so I wouldnt know but I can suggest that you remove .htaccess altogether, and use just php if you are deperate. You can still … | |
Re: [QUOTE=islandbreeze;521994]Hi, A simple problem for you I hope. I have applied a pre-made javascript to a dreamwever template. It works fine when I preview the template in the browser. When I apply the template to other pages it will not work - the container box shows but it cannot show … | |
Re: You can have JavaScript save cookies. This is done immediately, so page reloads are not needed. Example JS: [CODE]/** * Set a cookie * @param string cookie name * @param string cookie value * @param string cookie expiration counter in days * @param string cookie path * @param string cookie … | |
Re: [QUOTE=hmullie;521575]Hi all i have started a website however i have a problem with the chat script does anyone have knowledge about dolphin scripts. my users seems to be offline even though they are there. just been suddenly disconnected in the chatroom and then the site shows they are offline. the … | |
Re: Can't see why your codes doesn't invoke xmlHttp=new XMLHttpRequest(); bit odd. [CODE] var xmlHttp; function getXmlHttp() { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { alert("Please use a new browser!"); return false; } } … | |
Re: [QUOTE=Lee-Pro;515513]Hey everyone, this is a very tough problem I am facing right now in JavaScript. I'm designing this script to load a page like an IFrame but is using AJAX, the only problem is that I need to edit certain attributes before displaying them through changing an element's innerHTML attribute. … | |
Re: Attach an event to the onchange property that will check the whole value of the input, not just the key pressed. It would be slow, and decrease usability a lot. I'd recommend something along the lines of what MidiMagic said. Like attaching an event to onblur or the form submission … | |
Re: [QUOTE=shreevidya;515337]i am doing a project where i require some message from php file to be transfer to c.is it possible to do. if so can u specify certain links for looking and studing too area[/QUOTE] Not sure if PHP has an API for this. You could run a command on … | |
Re: [QUOTE=smilyswapna10;512161]hi, i did uploading a file with using <input type=file> but is it possible to upload file without using<input type=file> i am using PHP as server side language Thanks, swap.[/QUOTE] Not unless the browser has allowed local file access via a "decreased" security setting. | |
Re: i know mootools has a method that will serialize the form into a query string. I'm sure other popular JS libraries will have one too. | |
Re: [QUOTE=ineuw;504699]I built a web page form, where the action is set to "mailto" to my email address. I already scripted the client side using Javascript and I wish to know if I can use Javascript for server side scripting as well? I do not know PHP, nor Perl, and prefer … | |
Re: Attach DOM nodes to your Document instead of replacing innerHTML. Any text selection will disappear when you remove text, then replace it with new text. When attaching DOM nodes, only the added HTML Node is injected into your HTML, and the text selection will remain. It will also not flicker … | |
Re: I don't think you can use is_int() since all HTTP data is considered strings. There is no type distinction in HTML FORMS or HTTP GET/POST responses. You could check for range: [CODE] if ($var > 0 && $var < 100) { }[/CODE] Or you can use something like: [CODE]if (intval($var) … | |
Re: [QUOTE=dRoot84;506762]Hi guys, I know this thread was years ago, but I think many many people are looking for a solution for this problem but not finding anything. Scrolling a scrollable DIV tag is pretty easy by using the fabulous prototypejs framework by [url]www.prototypejs.org[/url]. Lets see what we've got here... some … | |
Re: Congratulations. You have a very nice CMS. It works fine for me, tested on PHP 5.1.6 (cli). No problems at all. PHP info: [QUOTE] PHP Version => 5.1.6 System => Linux server.fijiwebdesign.com 2.6.18-sept26el5 #7 SMP Thu Jan 10 16:02:00 EST 2002 i686 Build Date => Oct 26 2007 13:46:09 Configure … | |
Re: [QUOTE=chitra1;504478]Hi everyone! I'm working on a project whereby the system is rule-based. I have to write the rules in either Common Lisp but the problem is that i'm using PHP for designing the interface and I'm not able to link these two languages. Could anyone plz help me??????[/QUOTE] What type … | |
Re: [QUOTE=halifaxer;505210]Hi there, Bit of a complicated query, for me anyway. lol Following code: [code]$url = 'http://www.cheapsmells.com/viewProduct.php?id=6590'; $html = file_get_contents($url); preg_match('/<div class='productOurPrice'?>(.+?)(\d+\.\d+)(.+?)?<\/div>/', $html, $match); $out = $match[2];[/code] Great, no problem! However, this next url I need to code to is a bit trickier as the tag data is, well see below... … | |
Re: [QUOTE=saranya_arun;504518]I have 4 radio buttons and 4 text boxes, say for eg: r1, r2, r3 and r4 and t1, t2, t3 and t4 respectively. On load of the page all 4 text boxes will be disabled, when i click on r1, t1 must get enabled. When i click on r2, … | |
![]() | Re: [QUOTE=tie372;504778]Thanks it worked perfect.[/QUOTE] Since you're obviously selecting all genres, you don't need to SELECT the genres first. You just have to order your results by the genre, and then by the name. Just use: [CODE] $sql=mysql_query("SELECT * FROM bands ORDER BY genre, name");[/CODE] If there are some bands that … |
Re: I'm not familiar with the way Hotornot or Hi5 do it. Do you receive actual emails in your mailbox, or is it just notifications of Private messages from other users? The easy way, is to have a private messaging system, and then notify users via email of new messages, and … | |
Re: [B]Try:[/B] [url]http://www.php.net/curl[/url] - PHP curl Lib docs [url]http://curl.haxx.se/libcurl/php/[/url] - Curl Lib Author's site The nice lil class contributed by Sean Huber to the PHP docs should work quite well for simple HTTP tasks... [php] <?php /* Sean Huber CURL library This library is a basic implementation of CURL capabilities. It … | |
Re: [QUOTE=redZERO;495525]Hi, I would like to know a resource or simple solution for this, I have a mySQL database with lots of links. I need said solution to visit each link and download the HTML file for it. Like an indexer which is told where to index.[/QUOTE] If you have CURL … | |
Re: [QUOTE=tefflox;499412]I get that, but I don't want any redundancy in the links. Your suggestion might offer the same page twice or more times in a row.[/QUOTE] You'll need to keep track of the visited links via the client session. You can add it directly to PHP's built in session, or … | |
Re: [QUOTE=ShawnCplus;499324][code=php]$purl = $resultat->product_thumb_image; echo "<img src='test/image/products/".$purl.".jpg'/>";[/code] Firstly you don't need disambiguation parenthesis when there's no ambiguity. Secondly look at the source of the page that is displayed on and see what is actually output. If it just says [inlinecode]<img src='test/image/products/.jpg'/>[/inlinecode] then [inlinecode]$purl[/inlinecode] isn't being set.[/QUOTE] Either your $purl var is … | |
Re: [QUOTE=dheeraj5689;497322]Hi Everyone, I just want to know that can I implement a Facebook api on my server? It means all the facebook feature should be display in my server. Please anyone have any knowledge about this featured had provided by facebook then please guide me. Thanks Dheeraj[/QUOTE] In general, to … | |
Re: You can do a search on sourceforge.net under the trove category programming->php. You should find what you are looking for. I believe e-groupware should do the job: [url]http://www.egroupware.org/[/url] The other options are php-collab and dotproject. I havent looked at them for a while but they should have grown from when … | |
Re: [QUOTE=cscgal;195561]Is it possible to make an entire [INLINECODE]<div>[/INLINECODE] into a hyperlink using CSS only, as can be easily accomplished with mouse events in JavaScript? I'm assuming it's too good to be true since CSS isn't interactive? Nevermind ... I guess I just answered my own question :([/QUOTE] Nope, unfortunately you're … | |
Re: [QUOTE=jay64;482040]I don't really know how to explain this easily. I guess I will layout the project I am trying to do, and the problem I am having with it, and maybe someone could explain it better to me. I am trying to build an online food journal for a fitness/nutrition … | |
Re: If you use a <script> tag then you will get the URL/page where the <script> tag is in as the referer. example: if index.php has: <script src="spy.php"> Then you'll always get index.php as the referer. This is because the user was on index.php when the HTTP request for spy.php was … | |
Re: [QUOTE=adrive;479780]hi, im not entirely fluent in the http headers, but i just did a test, with an ajax page that calls php to save something. I then tried throwing an exception from php, but ajax's status is still 200. So does this mean i have to return other http status … | |
Re: [QUOTE=Taffd;479700]Is it possible to include the character < in a regular expression? I don't seem to be able to find a reference to it anywhere and am unable to build a regex with just this one character.[/QUOTE] Yes, there is nothing special about the < character. eg: [CODE]preg_match("/</", "<div>some text</div>", … | |
Re: Since you cant change the existing html pages, every time a user clicks on a link in your template, it links to the html page directly, and not through your template. Avoiding this cannot be one with a server side scripting language anyways. It depends on the server you are … | |
Re: [QUOTE=fernandodonster;448428]I would like to take back of my database of postgress. now i am doing the command "pg_dumb " which written in a shell script and run it on command promt How it will do with PHP? Can i use that shell script in the PHP? Is there any need … | |
Re: [QUOTE=Inny;448373]can somebody please show me how to make images clickable thumbnails of uniform size for an image marquee?[/QUOTE] You can use a server side language to resize the images to a defined thumbnail size. I work with PHP mostly and this is done easily with the GD2 Library, or Imagemagik. … | |
Re: [QUOTE=Lucrezia;423465]Hello all! I am using some javascript code to change some classes of an external stylesheet on the fly. Is there any way (a variable perhaps?) to access the changed stylesheet so that I store it afterwards with php, or should I rebuild it again (according to the options of … | |
Re: Hi, Could you post some of your code? The error message is quite detailed.. have you checked those suggestions? | |
Re: [QUOTE=Nichito;422865]here are all my codes: [B]dbconnect.php [/B][code=php]<?php mysql_connect("localhost","nobody","ydobon") or die("<h3>could not connect to MySQL</h3>\n"); mysql_select_db("guestbook") or die("<h3>could not select database 'guestbook'</h3>\n"); ?>[/code] [B]sign.php [/B][code=php]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> … | |
Re: Hi, Here is an example of how to pass a parameter to a javascript function. [code] function myfunction(param1) { alert(param1); } myfunction('hello'); myfunction('bye'); [/code] If you run that piece of JS, you'll get an alert window with the string "hello", then another alert window with "bye". However both alert windows … | |
Re: [QUOTE=david555;423305]hi, my purpose of my code is to get an array of subcategory details and format it and when when mouse over some subcategory - an image will change (dynamically). this code is PHP with Javascript My problem is how can i get the variable 'key1' from the javascript funtion … | |
Re: peculiar... is there some code you could post? Are you using persistent sockets? Whats the protocol used to talk to the remote server? could also be an issue was with the remote server. | |
Re: [QUOTE=binoj_daniel;418514]How can setup an automated mailing of datadriven content on some schedule? How can i implement using PHP? Is there any configuration on the Web Control Panel? Any ideas?[/QUOTE] What web control panel are you using? Many of the web control panels used by hosting companies will allow you to … | |
Re: [QUOTE=tshivaraj;416669]Hi All, Is there a way to terminate an AJAX thread. I have an application where if a user selects multiple options in a rapid succession it causes a deadlock situation. I would like to terminate the previous thread, if a new one is spawned. I am using prototype. Thanks, … | |
Re: Not sure how the code is going but I don't see [B]startStop[/B] being instantiated. If you have something like: [CODE]startStop = setTimeout(function() {}, 1000);[/CODE] Then you can stop it using: [CODE] clearTimeout(startStop);[/CODE] or clearInterval() I believe for setInterval(). |
The End.