Jump to content

Recommended Posts

Hello
I posted yesterday in the Ajax forum and "tomfmason" provided me with some good advice and direction, but json is still javascript and can be turned off.
I am creating a site with some 1000 pages and maybe 950 will be created from one template.
Basically I need to update the data only and not the page for most of the time. I thought Ajax may be the answer untill it was pointed out to me that between 10% and 15% of people turn off Javascript.

Is there another language that cannot be turned off that can update the webpage without reloading? or is there a technique that can be used with say, PHP or other language that can do the same thing, update the data without a refresh.
I am doing as much research as possible between breaks from the boring stuff of inputting data into a MySQL database.

Kind Regards
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/
Share on other sites

I think the numbers are actually much less than 10-15% less than that and it's getting to the point where so many sites use JS to achieve some effect that most designers are throwing caution to the wind and using it.

I would suggest that you're probably safe to use it.  If nothing else, put a disclaimer on the site about JS.
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169063
Share on other sites

Regarding page refresh.

With some 950 pages out of about a 1000 being idendtical except for the data I considered that to just udate the data would be the best way. Plus then I would for example only have say 51 pages to the site. 
Is there a better way?
Regards
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169121
Share on other sites

Like jcombs, I'd just use AJAX and take the risk that few users are daft enough to have JS turned off.

I'm really confused about the type of site you are running and why you think you'd need to create 950 pages without this dynamic refresh portion. 

Can you explain what the site is for and what it does?
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169125
Share on other sites

Certainly.
It is a family history website and involves my own family plus the family history of 8 more families who married into my family.
The site would be based on for example a family treemaker type presentation so that by clicking on one family member name his/her  datails would be updated together with their children and parents.
There are about 6000 names to go into the database which I am inputing.
Is there another way that I have not thought about to create the site?
Regards
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169133
Share on other sites

i'm 100% behind ober's first post in this topic. if we all wrote for majority groups and ignored the minorities, then we'd all be writing CSS hacks and invalid code for IE still. Youtube/Google/Yahoo/MSN all use javascript - and it's pretty hard to avoid those on a day to day basis....

So yeah - "Sod it and use AJAX" gets my vote too.
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169134
Share on other sites

No
Data will only change when the viewer clips on a link. I agree that you can change the data with PHP but I was of the opinion the it would also refresh the page. Because so many pages are the same except for the data I am trying to avoid this happening.
Regards
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169148
Share on other sites

The benifits I see to the user are that they will have a static page on the screen and I assume a faster refresh of data than if they loaded a static page.
To crayonviolet each page will have 28 placeholders for data. I have thought through what I consider to be a reasonable page design for the template. Is there something other that I should be considering?

Regards
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169202
Share on other sites

With iframes, you can have a div, or 1 small area of the website which can change and update independantly of the main browser window you are in.
I.E. if you have a click area/button etc - you could possible put this inside a seperate page called databutton.php and call this via an iframe. When the person clicks submit etc. only that window will change.

You should read up more about it.
-steve
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169232
Share on other sites

having said that, how much of the page gets refreshed? if i'm picturing this right, and going by what you said, then a large portion of the page is going to be updated - maybe just not the logo/nav (ie, the "outer" template), etc.

ok, so a page refresh is gonna take slightly longer - but an AJAX call is STILL a page request, no matter how it's buttered up. if a large part of the page needs updating, then the "normal" way of refreshing the page is gonna be your best option.
Link to comment
https://forums.phpfreaks.com/topic/35682-which-language/#findComment-169243
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.