
sonal
Members-
Content Count
121 -
Joined
-
Last visited
-
Days Won
2
sonal last won the day on June 19 2012
sonal had the most liked content!
Community Reputation
8 NeutralAbout sonal
-
Rank
Advanced Member
-
As I'm exploring web development, I found wordpress interesting, popular and "need to know" kind of thing. So, far I come to know about different themes and how to set up it among other basic stuff. I like to know : 1. How to I know where I need to change PHP code? I mean which file for what purpose? I know there is lot of WordPress tutorials and resources around there, but it is overwhelming and making me more confused. 2. I see posts filed under series on this site. Like there are Yii series, jQuery series and more. How do I collect posts filed under different categories and then s
-
I want to add a modal window (created with css and javascript) to pop-up a form when a user clicks "add quote" button on one of my php script. I have created a form in q1.html file, with required div settings. There is a modal.css file as Larry has given in the book. This html file on its own shows a poping up modal window with it's own "show window" button. Now, I want to include this html file in one of the php script. If I use a link with <a href" tag pointing to q1.html file, it opens up in an entire new window. That is of no use to use a poping up modal form. If I use "include
-
Hi HartleySan, thanks for your suggestion. I did what you said (combine all different stuff into one file, making a new function for each task). AND MAGIC.. it's working, as I expected it to work. Good.. I like all these stuff about js, ajax and php really much.. But I would like to know, what of my code seems a bit odd? Will you please share your looks/concerns or anything that I'm doing wrong in above code? Thanks again..
-
Ajax Worked Last Week, Now It Doesn'T
sonal replied to tonyscarpelli's topic in Modern Javascript: Develop and Design
It is necessary to run your ajax script through a server. Larry has explained it like this, "If your request is returning a 0 status code, you probably are not making the request through a URL. I hope that's what where the problem is coming from in your case... -
I thought so. I should explain in detail what I'm upto. I want to display "quotable quotes" on index page. To do that I'm fetching quotes through ajax and putting that js script into my "header" html page. code for that: /* * return json data from quotelist.php using ajax. * */ window.onload = function() { 'use strict'; var quoteDisp = document.getElementById('qquote'); var jAjax = getXMLHttpRequestObject(); //This is defined in another file. Which is working nicely. jAjax.onreadystatechange = function() { if(jAjax.readyState == 4) { if((jAjax.status >= 200 && jAjax.st
-
Thanks a lot, HartleySan for your reply. Although, I have used different ajax objects in both forms they don't seem to work together. Still the problem is as it is. Each html file works great individually, but when I keep both of them on the same page, only one of it works. I also have included third js-ajax-php script on the same page. So, now this one works and the other two stopped working. How do I do that?
-
I have two forms on my index page. Both of these forms uses ajax to fetch and display data on the page from different php scripts. Both works great individually, showing results as expected. But, when I put both of them at the same time one of them is not showing resulting data. I have used addEventListener in my javascript to add events and my ajax part of both scripts use ajax.send(null) at the end of a function sending data off to php. What can be the problem? What am I missing? thanx in advance
-
I see examples how to fetch data from php to ajax (and display it via javascript.) As in log-in example, we can check whether there is a valid email and password entered, we can simply display "You are now logged in." Till here I understand and work out. But, now as the user logs in, I need to set the php session. The login form sends data to the ajax.php, which simply returns a success message. In other case, if I just use php to check valid login details, I can set php session as soon as the script finds match data. I know I can send ajax data through URL to second php page, where it
-
How To Plan A Website And/Or Blog?
sonal replied to sonal's topic in Newsletter, Blog, and Other Topics
First I would like to know how to plan in terms of developing the code. (Ok, so now I know there are 2 different things when it comes to plan.) Thanks -
May be this is an old question. May be I read something about website development planning in one of the Larry's newsletter. But, I don't remember it now. I really want to know in detail, up to the advanced level, how to plan a website? As well as, about the blog. Is this site, Larryullman.com, a website or a blog? I know the subject for my blog. So that brainstorming is kind of done. What things should I know if I plan a long-term, successful blog where I myself can keep interest of posting new entries? Now, I that I'm learning about website development technology since a year, I can wr
-
As far as I understand this case is something like : parseInt function is used to show how to convert randomly generated float numbers to integers, as random.js shows use of for loop. volume calculator uses if(isNan(volume)) condition to check whether the incoming value is valid number, to show if-else if conditionals. If a value is coming from text input, it may be treated as a number or a string. There is no guarantee that if you enter a number in a text type input it will treated as a number all the time. It is better to use parseInt or parseFloat function while making numeric calc
-
Finding Maximum Of 3 Numbers
sonal replied to sonal's topic in Modern Javascript: Develop and Design
I got it corrected. a, b and c values were coming from text type form fields. So they were comparing as strings rather than numbers. I had to use parseInt function to convert them to numbers before comparing them. That is a simple example to show how to use nested if. Thanks for looking.... -
What is wrong with following neseted if conditions? This program shows wrong result to compare 3 integer numbers and find out maximum number. I'm so confused. This program gives a wrong maximum number. var a = prompt("Enter first number"); var b = prompt("Enter second number"); var c = prompt("Enter third number"); var answer; document.getElementById("no1").innerHTML = "a : " + a; document.getElementById("no2").innerHTML = "b : " + b; document.getElementById("no3").innerHTML = "c : " + c; if(a > { if (a > c) { //alert("a is maximu : " + a); answer = a +" a i
-
My Form Validation
sonal replied to sonal's topic in PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
oh, ok. here 'Quote' is a simple string (quotable quotes like thing). (I have kept its length from 20 characters to 800 alphabetic characters.)