I'm building a photo gallery that fades in images using JS. In order to have the images show when JS is not turned on i'm hiding the images with JS immediately on page load before fading them in.
I know it's 'illegal' to have text just for crawlers then hide it from real users with JS so I'm worried that a search engine crawler will see that I'm hiding images after page load and penalize the page.. even though i am turning them back...
User Profile
Collapse
-
Do hidden images affect SEO?
-
Ok, have you ever chased an error for 8 hours then realized you had the wrong path all along. As it turns out the require_once function in the new page had the wrong path duh.
I'm not sure why the error says "URL file-access is disabled" - that really through me off and cost me a day.
Thanks for reading. -
URL file-access error when generating a php file with file_put_contents()
Hi, I'm using PHP to create and save new .php pages using:
Code:file_put_contents("photo/".$name."/index.php",$file);
Warning: require_once() [function.requir e-once]: URL file-access is disabled in the server configuration in /home/html/new/photo/_MG_1166/index.php on line 5
If I copy the new files content and create... -
Is content added after page load invisible to search engines?
Hi, I'm creating an online photo gallery. I would like to be able to browse photos and descriptions using ajax retrieving from a database to improve the user experience.
What do people do about SEO? Won't my descriptions be invisible to search engines?
Do i create a separate hard coded page for each photo that a search engine can read? or is there another method?
Thanks -
Is database content added with php search engine friendly?
Is database content added to my html page using PHP search engine friendly? Are they cool with page.php rather than page.html?
Thanks,
Bugboy -
Thanks gits, I set a 10 sec timeout which is much longer than i took to click an alert box and it still didn't work. I've move 'listobj' call to another point in the code and it now works.
Thanks for your help!Leave a comment:
-
Yes this is an ajax call that appends the results to the head of the page.Leave a comment:
-
How to append script to head of page?
I'm retrieving list data via ajax then appending a retrieved script 'str[x]' to the page. The script is suppose to create a new 'List' object with the retrieved data.
Code:var head = document.getElementsByTagName("head")[0]; var script = document.createElement("script"); script.type="text/javascript"; script.appendChild(document.createTextNode(str[x])); head.appendChild(script);
-
Ahh right, Thanks for your help guys!
I'm not sure what the problem was, my arrays only have successive numeric members.. hard to pick the best answer..Leave a comment:
-
I've replaced the getChild for ...in loop with a while and it appears to work!
What was the for ..in loop doing wrong?
Code:function getChildren(rowid) { var x = 0; while(row[rowid].children[x]) { var child = row[rowid].children[x]; document.getElementById('children.'+rowid).innerHTML += row[child].html;//in the rows children container add the child row html getcells(child,
Leave a comment:
-
The recursive function is called inside the for loop so it is only called once for each subchild, when there aren't any subchildren the for loop stops.
Sorry i'm not sure what you mean by not only numeric members.?
(line #26): row[child].html is just an html string being retrieved from the row object.Leave a comment:
-
If i remove the call to it's self inside getChildren it works fine rendering both lists - except it won't get the children of the children so the tree/list only renders two levels deep. If i leave it in place the first tree/list renders fine with multiple levels but then the second list doesn't render at all, it's as if the initial 'for' loop in getList is just forgotten once recursion starts.Leave a comment:
-
'list' 'row' and 'cell' are all objects, i haven't shown their constructors.
'getChildren' and 'getCells' both write to the target element in the document so a return isn't needed as far as i know.Leave a comment:
-
'for' loop being killed before it's finished.
Hi I'm trying to build tree type lists where each row in the list has several cells (columns). My code will render the first list ok then stops. The first 'for' statement should be moving to build the second list, but the loop is killed. The 'list', 'row' and 'cell' constructors are not shown.
Any idea what's killing the initial iteration.. is it the recursion in getChildren()?
Thanks for you help!
Code:function
-
Oops, I've ask this before! Here is the answer:
array_splice()
http://bytes.com/topic/php/answers/8...t-middle-array
Thanks!...Leave a comment:
-
Insert new row into middle of array
I have an array which i want to insert a new value into the middle without losing any values. Is there an array function for this?
Code:ARRAY( [1] => "a" [2] => "c" [3] => "d" ) //I would like to insert "b" at key [2].. creating this: ARRAY( [1] => "a" [2] => "b" [3] => "c" [4] => "d" )
-
I found your previous solution in another thread. The string i'm adding has js code which is determined during the request so it can't be added during first page load.. is your code added to the head during the ajax request too? else how would i get the new string too it?
Code:1. var head = document.getElementsByTagName("head")[0]; 2. var script = document.createElement("script"); 3. script.type="text/javascript";
Leave a comment:
-
Thanks! I'm figuring out the eval thing... but i'm not sure what you mean by dynamically loaded with script tags, i'm replacing innerHTML with the <script> tags (see above) via ajax without luck.. does it need some type of handler function to register it once loaded, other than eval? not sure exactly what you mean.. i've read to avoid eval if you can...
Thanks for you time!Leave a comment:
-
how do you execute a js script loaded with ajax
I'm adding a script to a <div> element dynamically, after page load, via AJAX. My new script is just ignored.
Ho do i get the script to execute when dynamically loaded?
Code:<div id="a"> <textarea id="'.$id.'">'.$text.'</textarea> <script type="text/javascript">event_listener("'.$id.'");</script> </div>
-
No activity results to display
Show More
Leave a comment: