esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/13/2004 at 05:05 PM |
|
|
iframe question
Hi,
I have a scroller running on a website. Is it possible to switch to another scroller instance by calling it from inside an iframe on the same page? If
yes, how?
Thanks,
Ed
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/18/2004 at 10:22 AM |
|
|
Currently the feature is not available neither in free version nor in PRO.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/21/2004 at 05:34 PM |
|
|
That's too bad. I had planned to purchase the PRO version because it supports the endless loop feature but if I can't call it from inside an
iFrame on the same page, it's useless to me.
What about switching it from the page itself, not an iFrame? Would that work?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/22/2004 at 12:35 PM |
|
|
If you want to switch next/previous item (among defined at tpl file) the answer would be 'yes' either for page or for iframe at the page. If
you asking about switching scroller controls then answer is 'no'.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/22/2004 at 03:51 PM |
|
|
I'm not sure that I understand your answer. What do you mean by "next/previous" item as defined in the tpl file? All I want to do is to
switch the (0) in <script language="JavaScript">Tscroll_init (0)</script> to a (1) to initiate another scroller content.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/23/2004 at 10:28 AM |
|
|
That's impossible with standard script but I think it could be customized for you.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/23/2004 at 03:18 PM |
|
|
The PRO version should support that!
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/24/2004 at 09:01 AM |
|
|
The feature is never mentioned within the Tigra Scroller PRO documentation.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/25/2004 at 03:52 PM |
|
|
What would the customization of the PRO scroller cost?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/26/2004 at 11:10 AM |
|
|
Please refer to our [url="http://www.softcomplex.com/support/"]Customer Care System[/url]. We'll discuss requirements, terms and quotation
estimates.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 11/30/2004 at 06:11 PM |
|
|
Rock,
I am trying something else that might work (with your help):
I have replaced this line:
<script language="JavaScript">Tscroll_init (0)</script> with this one:
<iframe name="iframe1" src="store/scroll_store.htm" frameborder="0" marginwidth="0"
marginheight="0" scrolling="no" align="left" hspace="0" vspace="0" width="552"
height="83"></iframe>
When the parent page loads, the scroller src="store/scroll_store.htm" runs in the iframe1 space. Here's the code of the
scroll_store.htm:
<html>
<head>
<script language="javascript" src="ts_files/scroll.js"></script>
</head>
<body>
<script language="JavaScript">Tscroll_init (0)</script>
</body>
</html>
So far so good.
Further down I call another page into an iframe2, works great. The newly loaded page has this onload function:
<body "onload=load();" src="store/scroll_antiques.htm" target="_parent.iframe1">, which is supposed to replace the
src from store/scroll_store to store/scroll_antiques, which contains another scroller instance.
Does that make sense?
I don't get any js error messages but it does not work either. Can you please help here?
Thanks,
Ed
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/1/2004 at 09:52 AM |
|
|
As I know iframe has no 'target' attribute. So you could try with iframe2 something like the following:
<script language="javascript">
function load(){
parent.document.all['iframe1'].src = "new_iframe_scr.html"
}
</script>
<body onload="load();">
....
</body>
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/1/2004 at 05:53 PM |
|
|
Scott, thanks a lot.
I think you're getting close, just one error message shy of success!
When the iframe page loads into the parent page, the original scroller disappears, as it should, but it is not replaced by the other scroller instance
but with a white window "The page you are looking for is currently unavailable....." and an error message pops up
'parent.document.all.iframe1' is null or not an object. Any ideas?
Ed
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/2/2004 at 09:46 AM |
|
|
I've tried changing iframe src and scroler did replaced. You can attach here your sample and I'll inverstigate the issue.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/3/2004 at 05:32 PM |
|
|
This piece of code produces an erorr message ( 'parent.document.all.iframe1' is null or not an object), probably my fault:
<head>
<script language="javascript">
function load(){
parent.document.all['iframe1'].src = "new_iframe_scr.html"
}
</script>
</head>
<body onload="load();">
</body>
</html>
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/3/2004 at 06:43 PM |
|
|
Never mind, I found it.
I changed this line
<script language="javascript">
function load(){
parent.document.all['iframe2'].src = "store/scroll_antiques.htm"
}
</script>
</head>
<body onload="load();">
and it works.
Thanks for all the help.
Now, if you could find the onmouseover solution, I'd be ready to buy the PRO version.
Ed
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/3/2004 at 08:42 PM |
|
|
Sorry to bother you guys again, I was a bit hasty in saying it works. It does work in IE but not in Opera 7.xx. Could this be connected to the error
message I still get with this script: 'parent.document.all.iframe2' is null or not an object ?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/6/2004 at 08:39 AM |
|
|
Opera browser does not support document.all collection. When I paste the sample I assume that its your responsibility to provide required browser
compatibility.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/6/2004 at 03:42 PM |
|
|
So, inother words, you can't help me any further?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/6/2004 at 05:00 PM |
|
|
try parent.getElementById('iframe1')
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/6/2004 at 05:23 PM |
|
|
Like this:
<script language="javascript">
function load(){ parent.getElementById('iframe1').src = "store/scroll_antiques.htm" }
</script>
</head>
<body onload="load();">
It creates this error message:
Object doesn't support this property or method
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/6/2004 at 05:37 PM |
|
|
try parent.document.getElementById('iframe1')
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/6/2004 at 05:49 PM |
|
|
That works, but again, only in IE, not in Opera and not in Firefox.
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 12/7/2004 at 09:59 AM |
|
|
I've tried the solution with Opera7.0+ Mozilla 1.2+, FireFox1.0, NN6.2+
Works good.
|
|
|
esm
Member
Posts: 39
Registered: 1/7/2004
Member Is Offline
|
| posted on 12/8/2004 at 10:46 PM |
|
|
I've figured it out. Apparently, Opera wants all involved files in one folder. I reworked the folder structure and it works now in IE, Opera and
Firefox.
Thanks a lot for all your help. I just hope that I don't run into new trouble when I use the PRO version (once the onmouseover issue is resolved
:-).
Ed
|
|
|