rama1977
11-29-2006, 03:29 PM
Hi,
I want to change the path value of src attribute of <script> TAG dynamically so that different data gets displyed.
I have the following code
<script language="Javascript"
var today = new Date();
var time = today.getTime();
if (time%2 == 0)
{
src="http://www.indiaglitz.com/channels/hindi/rss/news_js.asp";
}
else if (time%3 == 0)
{
src="http://www.indiaglitz.com/channels/hindi/rss/news_js.asp";
}
else if (time%5 == 0)
{
src="http://www.indiaglitz.com/channels/telugu/rss/news_js.asp";
}
else if (time%7 == 0)
{
src="http://www.indiaglitz.com/channels/malayalam/rss/news_js.asp";
}
else
{
src="http://www.indiaglitz.com/channels/kannada/rss/news_js.asp"
}
></script>
I am substituting src value dynamically.But it does not change after it is loaded for first time.I think once the data got displayed inorder to do display the new content i have to reload the page.But i do not want to refresh the whole page only the portion where this data gets displayed.
Kindly let me know how i can do it.
Thanks
I want to change the path value of src attribute of <script> TAG dynamically so that different data gets displyed.
I have the following code
<script language="Javascript"
var today = new Date();
var time = today.getTime();
if (time%2 == 0)
{
src="http://www.indiaglitz.com/channels/hindi/rss/news_js.asp";
}
else if (time%3 == 0)
{
src="http://www.indiaglitz.com/channels/hindi/rss/news_js.asp";
}
else if (time%5 == 0)
{
src="http://www.indiaglitz.com/channels/telugu/rss/news_js.asp";
}
else if (time%7 == 0)
{
src="http://www.indiaglitz.com/channels/malayalam/rss/news_js.asp";
}
else
{
src="http://www.indiaglitz.com/channels/kannada/rss/news_js.asp"
}
></script>
I am substituting src value dynamically.But it does not change after it is loaded for first time.I think once the data got displayed inorder to do display the new content i have to reload the page.But i do not want to refresh the whole page only the portion where this data gets displayed.
Kindly let me know how i can do it.
Thanks