Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Help with embed script in asp
Old 05-31-2008, 08:14 PM Help with embed script in asp
sandbox's Avatar
Extreme Talker

Posts: 153
Trades: 0
I'm having trouble working out the best way to do this:
I want to have a short piece of code webmasters can use to embed some information from a database on my site, I can easily knock up an asp page that displays the data required but how do I get that onto someone elses website. I thought about an Iframe but there has to be a better way.

Can anyone point me toward a possible solution?
__________________
¦
Please login or register to view this content. Registration is FREE
s ¦
Please login or register to view this content. Registration is FREE
¦
Please login or register to view this content. Registration is FREE
sandbox is offline
Reply With Quote
View Public Profile Visit sandbox's homepage!
 
 
Register now for full access!
Old 06-01-2008, 06:45 AM Re: Help with embed script in asp
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Is the "other" site also asp?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-01-2008, 12:23 PM Re: Help with embed script in asp
sandbox's Avatar
Extreme Talker

Posts: 153
Trades: 0
No not necessarily, the idea is any other site/sites can embed the data. I'll give an example to illustrate in more detail:

I have a webpage with some content on it, a short piece of code is presented in a box so any webmasters can embed the data in there own pages (a bit like youtube) the embed code shows condensed data which is linked to the full page.

This is simple with an image or static text but the data is changed regularly and so has to be generated dynamically from a database. I can put together an ASP webpage to show the condensed version of data, all I need is a way to embed this into any other webpage.

Looking for something simple and SEO friendly so search engines can see the data and I can benefit from the link. That's why an Iframe is no good
__________________
¦
Please login or register to view this content. Registration is FREE
s ¦
Please login or register to view this content. Registration is FREE
¦
Please login or register to view this content. Registration is FREE
sandbox is offline
Reply With Quote
View Public Profile Visit sandbox's homepage!
 
Old 06-01-2008, 12:47 PM Re: Help with embed script in asp
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Then all you can do is make the data available via a URL, either as a XML feed or a HTML page (or both). Include a link to the URL on your site where the same content can be read in the context of your site.

It is up to the data consumer exactly how it will be embedded in their page, you cannot control that.

Forget about the SEO aspect and consider the far more important marketing aspect.

For what you are asking about even iframes are NOT a problem as the page will be indexed on your site rather than on a third party site, which may have more "importance" than your site and therefore your page on another site may well end up filtering out your page on your site.

Iframes are only a problem when putting your own content on your own site.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-01-2008, 03:42 PM Re: Help with embed script in asp
nyef's Avatar
Ultra Talker

Posts: 265
Name: Lucas
Trades: 0
Compromises:
- You can put your link outside the iframe, the iframe allows dynamic generation from your server and the link above or below the iframe gives you SE credit for being linked (but they can remove this link when pasting if they want to be mean)
- You can use a dynamically generated javascript file. They would paste code like:
Code:
<script type="text/javascript" src="http://yoursite.com/yourjs.asp"></script>
The .asp allows you to generate the data dynamically, or you could use .js and set up your web server to process .js files through the php engine.
- You could use a server-side script that runs periodically (once an hour or something), which writes your data (using the FileSystemObject) to a static .js file which then document.writes out the data, and have them include that .js file

Umm that's all I can think of

Last edited by nyef; 06-01-2008 at 03:43 PM..
nyef is offline
Reply With Quote
View Public Profile Visit nyef's homepage!
 
Old 06-01-2008, 04:40 PM Re: Help with embed script in asp
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
If you know the foreign server is up to it, you could make a web service that will fetch the actual html you generate and then write it out on its page while the page is being generated. That wouldn't work if I wanted to use your content in a wp blog ... iframes are probably your best bet here.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 06-01-2008, 07:54 PM Re: Help with embed script in asp
sandbox's Avatar
Extreme Talker

Posts: 153
Trades: 0
Thanks guys, I had a dig about on the net and the only other way I can find would be embed object (this is what youtube use) would this be better or worse than an Iframe?
__________________
¦
Please login or register to view this content. Registration is FREE
s ¦
Please login or register to view this content. Registration is FREE
¦
Please login or register to view this content. Registration is FREE
sandbox is offline
Reply With Quote
View Public Profile Visit sandbox's homepage!
 
Old 06-09-2008, 12:55 PM Re: Help with embed script in asp
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
You should probably use AJAX to link to the database, this way the page can refresh the data periodically without having to refresh the page. If you are not familiar with AJAX, get familiar... It looks scary but try it when you "get" it, you will be amazed how simple and powerful it is. 20 minutes should make you an expert.
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with embed script in asp
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26350 seconds with 12 queries