hi all,
here is my aspx.cs class code
          
DataSet dsXml=new DataSet();
dsXml.ReadXml("C:\\Inetpub\\wwwroot\\ChartingCS\\js\\books.xml");
foreach (DataTable dTable in dsXml.Tables)
{
   foreach(DataRow dr in dTable.Rows )
            {
sString =sString + "\n"  + dr[0].ToString();
            }
}

and here is the _javascript_

<script language="_javascript_">

//var stsdisplayevents=<%Response.Write("sString");%>     
                 
//var strdisplayevents=Label1.InnerText

var strdisplayevents=(document.all("TextBox1").value)
//var strdisplayevents=document.all(#sString).value)

//var javavariable=<#=sString.ToString()>
var test=""
//Specify the marquee's width (in pixels)
var marqueewidth="200px"
//Specify the marquee's height
var marqueeheight="150px"
//Specify the marquee's marquee speed (larger is
faster 1-10)
var marqueespeed=1
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//document.write(javavariable)

//Specify the marquee's content
//Keep all content on ONE line, and backslash any
single quotations (ie: that\'s great):

var marqueecontent='<font face=<font color="blue"
size="3""Geneva, Arial,
Helvetica,sans-serif"><b><u>Hot
Events</u></b></font><p><font face=<font
size="2""Geneva, Arial, Helvetica,sans-serif">' +
strdisplayevents + '  + </font><p><font color="blue"
size="3""Geneva, Arial,
Helvetica,sans-serif"><b><u>Software</u></b></font><p><font
size="2""Geneva, Arial, Helvetica,sans-serif">Code was
modified by Open World.(Dot Net version).  </font>'

////NO NEED TO EDIT BELOW THIS LINE////////////

marqueespeed=(document.all)? marqueespeed :
Math.max(1, marqueespeed-1) //slow speed down by 1 for
NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById?
document.getElementById("iemarquee") :
document.all.iemarquee
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualheight=cross_marquee.offsetHeight
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.top=parseInt(marqueeheight)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualheight=ns_marquee.document.height
}
lefttime=setInterval("scrollmarquee()",20)
}
window.>
function scrollmarquee(){

if (iedom){
if
(parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
}

if (iedom||document.layers){
with (document){
if (iedom){
write('<div
style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden"
> > write('<div id="iemarquee"
style="position:absolute;left:0px;top:0px;width:100%;">')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+'
height='+marqueeheight+' name="ns_marquee">')
write('<layer name="ns_marquee2"
width='+marqueewidth+' height='+marqueeheight+' left=0
top=0 > > write('</ilayer>')
}
}
}
                                    </script>



what i want is to set the sString content as
_javascript_ marquee contents

Thanking you
Rasika



--- Ian Moores <[EMAIL PROTECTED]> wrote:

---------------------------------
Well the 4th step would all depend on what you've done
in the third step,
How have you formatted the xml? How does your marquee
read the text etc,
very simply, you could do this,
Once you have got the xml into a datatable then simply
read the elements
your interested in and concatonate them into a
protected string class, then
do as Ashish says... I cannot give you your answer as
it very much depends
on the format of the xml, what information you want
out of it, how your
javascruipt reads in it's text etc, but for practise
try this

C# code

protected string s;
DataTable dt = {YOUR_XML_TABLE)
foreach(DataRow dr in dt.Rows)
{
  s = string.Concat(s,(string)dr[0],",");
}

HTML CODE

<Marquee ><%=s%></MARQUEE>


>hi all,
>I 'm fine with first three steps , i have written a
>own marquee using _javascript_ , i'm not familiar with
>the 4th step.
>Display the contents of the XML file to the webpage.
>specially setting the xml file content to
>marquee(_javascript_) content.
>hope you'll can understand my problem,
>Thanking you.
>Rasika
>  --- Ian Moores <[EMAIL PROTECTED]> wrote:
>
>---------------------------------
>Hi,
>
>What Ashish says does answer your initial question,
>that is exactly how you
>get a class variable (assuming you've not declared it
>as private) into
>_javascript_. What is it exactly you want to know? Are
>you doing the Marquee
>yourself (e.g. using _javascript_) or are you using the
>HTML Marquee control.
>It sounds to me (and i may well be wrong) that you
are
>not sure exactly of
>what you are trying to acheive. If you want to know
>how to read and display
>the contents of an XML file then there are plenty of
>good examples out
>there. Whether it is your first or your 100th web
>application, you should
>always take the same approach, work out what you are
>trying to achieve and
>then work out what steps you need to take to get
>there, and then tackle each
>of the steps in turn. So for this it would be
>something like
>
>1) Connect to XML file
>2) Read contents of XML to required variable / stream
>/ dataTable etc
>3) Format the XML to the way you want to display it
>4) Display the contents of the XML file to the
webpage
>
>You could, of course, split these steps down further
>etc, but hopefully this
>has given you a guide on what you need to do.
>
>Cheerio
>
>Ian
>
> >hi all,
> >
> >In ASP.NET we have code behind class,Inside this
>class
> >i read a xml file and put the data into a class
>member
> >variable, this variable data i want to set it as
> >marquee content. Please help me , this is my first
>web
> >application.
> >
> >Thanking you.
> >In Advance
> >
> >Rasika
> >
> >
> >
> >  --- Ashish Gupta <[EMAIL PROTECTED]> wrote:
> >
> >---------------------------------
> >Hi Rasika
> >
> >
> ><script language='_javascript_>
> >var JSVariable=<%=ClassVariable%>
> ></script>
> >
> >
> >
> >Hope this helps
> >Regards
> >Ashish
> >
> >
> >rote:
> >hi all,
> >
> >How can i get a class variable value into a
>_javascript_
> >variable.
> >Pleasse help me
> >
> >rasika
> >
>
>________________________________________________________________________
> >Yahoo! India Matrimony: Find your life partner
online
> >Go to: http://yahoo.shaadi.com/india-matrimony
> >
> >Yahoo! Groups SponsorADVERTISEMENT
> >
> >
> >---------------------------------
> >Yahoo! Groups Links
> >
> >    To visit your group on the web, go to:
> >http://groups.yahoo.com/group/CSharpNET/
> >
> >    To unsubscribe from this group, send an email
to:
> >[EMAIL PROTECTED]
> >
> >    Your use of Yahoo! Groups is subject to the
>Yahoo!
> >Terms of Service.
> >
> >
> >
> >---------------------------------
> >Do you Yahoo!?
> >Yahoo! Mail Address AutoComplete - You start. We
> >finish.
> >
> >[Non-text portions of this message have been
removed]
> >
> >
> >Yahoo! Groups Sponsor  ADVERTISEMENT
> >
> >
> >---------------------------------
> >Yahoo! Groups Links
> >
> >    To visit your group on the web, go to:
> >http://groups.yahoo.com/group/CSharpNET/
> >
> >    To unsubscribe from this group, send an email
to:
> >[EMAIL PROTECTED]
> >
> >    Your use of Yahoo! Groups is subject to the
>Yahoo!
> >Terms of Service.
> >
> >
>
>________________________________________________________________________
> >Yahoo! India Matrimony: Find your life partner
online
> >Go to: http://yahoo.shaadi.com/india-matrimony
>
>_________________________________________________________________
>It's fast, it's easy and it's free. Get MSN Messenger
>today!
>http://www.msn.co.uk/messenger
>
>
>Yahoo! Groups Sponsor  ADVERTISEMENT
>
>
>---------------------------------
>Yahoo! Groups Links
>
>    To visit your group on the web, go to:
>http://groups.yahoo.com/group/CSharpNET/
>
>    To unsubscribe from this group, send an email to:
>[EMAIL PROTECTED]
>
>    Your use of Yahoo! Groups is subject to the
Yahoo!
>Terms of Service.
>
>
>________________________________________________________________________
>Yahoo! India Matrimony: Find your life partner online
>Go to: http://yahoo.shaadi.com/india-matrimony

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger


Yahoo! Groups Sponsor  ADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/CSharpNET/

   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

   Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.


________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5526708.6599542.3001176/D=groups/S=:HM/A=2372354/rand=226810303


Yahoo! Groups Links

Reply via email to