Why not
<script type="text/javascript"
src="http://yoursite.url/grabData.php?id=12345";></script>

And serve up the content via php*.... better yet, why even do a
<script> include?

* Replace PHP here with your server side language of choice.

On 8/23/07, junkmate <[EMAIL PROTECTED]> wrote:
>
> I am trying to get a system where a client includes one or two lines
> of Javascript in his page, and that code will grab dynamic data from
> my server and display it inline on his page.
>
> My code for the JS to include on the clients page is something like
> this:
> <script type="text/javascript">var id="12345";</script>
> <script type="text/javascript" src="http://my.site.url/grabData.js";></
> script>
>
> I then want to take that id, grab data from an SQL database, and print
> it back to the clients page inline... but I dont know how to connect
> to SQL using Javascript... anybody help?
>
>
> >
>


-- 
Matt Harris
(250)-588-2275

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to