
kareem_elzeiny
Members-
Content Count
48 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout kareem_elzeiny
-
Rank
Newbie
-
Hello Guys,I have this code which creates a text that redirects to a random post for a given feed URL ( For blogger blogs ) <div id="myLuckyPost"></div><script type="text/javascript">function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == 'alternate'){window.location = entry.link[j].href;}}} function fetchLuck(luck){ script = document.createElement('script'); script.src = 'http://googleblog.blogspot.com/feeds/posts/summary?start-index='+luck+'&max-
-
Thanks for your help, I've tried but I couldn't do it !!
-
thanks for help, but I don't know anything about looping.can you illustrate more if there is a tutorial page or an example ?
-
1) /g is to Perform a global search (the word Microsoft will be replaced each time it is found): the phrase above is not the exact in the script it's just an example I meant > 3.) Replace more multiple words with multiple words
-
Hi, using this method how can I replace more than one word ? var str="Visit Microsoft!";document.write(str.replace(/microsoft/gi, "W3Schools")); Regards,
-
Thanks for helpBut using this method the script takes a long time to load after the page loading var script = document.createElement('script');script.onload = function() { alert("Script loaded and ready");};script.src = "/open.js"; document.getElementsByTagName('head')[0].appendChild(script); Any Ideas ?
-
Hi, I'm trying to load a Script once per day using cookies but I can't make it !!I've found this cookies tutorial that opens a pop up once per day <script type="text/javascript">var expDays = 1; // number of days the cookie should last var page = "only-popup-once.html";var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes"; function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return get
-
Actually I'm using Blogger platform which doesn't give me a lot of options, so I can only use HTML & Java ScriptI found This script which redirect the visitor to a random post in the same blog <div id="myLuckyPost"></div> <script type="text/javascript"> function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == 'alternate'){window.location = entry.link[j].href;}}} function fetchLuck(luck){ script = document.createElement('script'); script.src = '/feeds
-
Hi,,How can I use Javascript to redirect a visitor to a RANDOM URL from a given RSS feed link (eg. "http://feeds.feedburner.com/blogger/WZDh" )Regards,,
-
It works ,, Thanks
-
Hello,In brief I'm using this Script whenever a visitor click an external link on my blog <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/><script type='text/javascript'>//<![CDATA[jQuery('a').each(function() {// Let's make external links open in a new window.var href = jQuery(this).attr('href');if (typeof href != 'undefined' && href != "" && (href.indexOf('http://') != -1 || href.indexOf('https://') != -1) && href.indexOf(window.location.hostname) == -1) { $(this).attr("target", "_blank"); if (hre
-
when calling this scripthttp://dstats.net/dstatsjs.php?file=http://google.comIt should calling information about the link "google.com" & the info changes by changing the urland dsCounter is a part of this EXTERNAL scriptand this other script will show the info called <script type='text/javascript'> document.write(dsCounter+'x');</script> If I call the this script directly <script type='text/javascript' src='http://dstats.net/dstatsjs.php?file=http://google.com'></script> The second script works with no errors but If I called it using the variable passing dependi
-
Thank you,, there were two variables called linkI've rename the second one and the two alerts now are loaded but I'm working now to solve a new error :/ Error: dsCounter is not definedSource File: http://sharingacademy.blogspot.com/?link=http://google.com&Line: 505
-
Well after correcting this error ,, another error appear Error: str is undefinedSource File: http://sharingacademy.blogspot.com/?link=http://www.w3schools.com/jsref/prop_loc_pathname.asp&Line: 440 and it's not even related to the non working script !!!
-
This is what's the Error URL looks like