Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Changing Width of a Object tag IE X FF

Hi there

I'm trying to change the original Width of a Flash Object directly from the Flash itself calling
getURL("javascript:document.getElementById('r_banner').width='100%'; void(0);");

That works great on IE but nothing happens on FF.

The reason I need to change it on the fly its cuz our page is a "pre manufactured" page wich give us lack of resources and a simple change to the banner to accept 100% width will costs us like $1.000 wich is annoying.

If you guys want to try it directly here is the link:
http://www.dermadoctor.com.br
This is the result constructed Flash Tag:

<span class=index_texto><div style="text-align: center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" id="r_banner" name="r_banner" width="701" height="192">
	<param name="menu" value="false" />
	<param name="id" value="r_banner" />
	<param name="name" value="r_banner" />
	<param name="src" value="../imagens/banners/dermadoctor_banner.swf" />
	<param name="width" value="701" />
	<param name="height" value="192" />
	<embed type="application/x-shockwave-flash" "align="abscenter" allowscriptaccess="sameDomain" quality="high" menu="false" id="r_banner" name="r_banner" src="../imagens/banners/dermadoctor_banner.swf" width="701" height="192"></embed>
</object>
</div>
</span>

Thanks for the support,

Ralph

Open in new window

0
furmiga
Asked:
furmiga
  • 3
  • 3
1 Solution
 
princeatapiCommented:
try affixing width:100% in <div style="text-align: center">
0
 
furmigaAuthor Commented:
Hi there

Here is the Thing:

I can't change the HTML since we are not the developers, we just bought the rights to use it.
So, basically, I want to change the HTML on the Fly, by using my own banner to do it.
I want my central banner to be a 100% width banner, wich in my Administrator Page I can't set it due to the tool provided.

So what can we do using our friend Javascript to accomplish this task? Is it possible?

Srry about my english - Brazilian here.

Ralph
0
 
princeatapiCommented:
this could be done only if you have access to the code :( atleast you must have access to the aspx page ..
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
furmigaAuthor Commented:
Hi

I'm just wondering why in IE my javascript works and why not in FF
The original banner width is 701px wich came with the original HTML.

FFBug tells me that my Script successful changed the Object tag but not the internal param width or the embed tag width, wich remains at 701px

Is there another approuch to change those parameters?

Ralph
0
 
furmigaAuthor Commented:
Hi there!

Solved!

Just had to add a call to the embed tag directly.

getURL("javascript:document.getElementById('r_banner').width='100%'; void(0);");
getURL("javascript:document.embeds['r_banner'].width='100%'; void(0);");

those solved my problem in both IE and FF

Thx anyway

Ralph
0
 
princeatapiCommented:
That Sounds Good !
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now