Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Monday, March 26, 2012

Willing to bet money that you cant figure this out!

I am working on this app... I have an iframe (hidden) in the app, and an image (also hidden) that eventually gets put into the iframe for printing.

My javascript is thus...

var img = "ctl00_ContentPlaceHolder1_cpnImage";
var daframe = document.getElementById("cpnframe");

document.getElementById("cpnframe").width = document.getElementById(img).width + "px";
document.getElementById("cpnframe").height = document.getElementById(img).height + "px";

frames[daframe].location.href = document.getElementById(img).src;
frames[daframe].focus();
setTimeout('frames[daframe].print()',10);

Now, when I run this on a regular HTML page, it works fine...

In my asp.net page, I get javascript errors stating that frames.cpnframe has no properties.

What gives?

What does the iframe look like in the HTML code generated by the ASP page compared to the HTML code in the regular HTML page where it works?


I believe it's in how you are referencing the frames. This article explains how to access frames properly.

http://www.quirksmode.org/js/frameintro.html


The iframe is the same either way. It not server side. I have looked at the page source on both and they are identical...

Very strange!

Saturday, March 24, 2012

Working Differently Remotely and Locally

Hi,
I'm just getting started with Atlas but and have a little sample working locally where I can drag an image around on the screen (little things...). When I upload to the server all I get is the page with none of the dragging ability.

I have installed .net framework 2.0 (before which the page didn't load at all) - is there anything else I need to do on the server?
It is a shared virtual server but I have admin remote desktop onto my share.

I'm sure it is a simple thing I've missed but I can't find out what it is.

Any help greatly appreciated.
Andrew

I assume you've uploaded the dll and web.config that you're using locally as well, right?

Can you provide a link to the online version? Who's the web host?

This problem when I've seen it before was a result of a problem with the WebResource.axd. In one case, the .dll was corrupt and so the resource was throwing out gibberish (you can see if that's the case by viewing yoru page's source after the server serves it and then copying and pasting the whole webresource.axd?...etc stuff into the address bar). In the other case, the host had a problem serving up the virtial file 'webresource.axd' and so I had to literally put a blank file named webresource.axd in the root of the site.

hope it helps

Paul

Working locally (both IE & FF), only working in FF on live server

I just got my personal website (link) updated with some Atlas enabled stuff, right there on the front page you can do "Show Different Image" in the top left or use the Calendar's left and right arrows to go through the months without postback.... but... as the subject says

Running on my laptop here: Atlas CTP installed, using studio's built in web server:
- All functions work in both browsers (IE 6, FF 1.5.0.4)

Up on my web server: Atlas CTP installed, IIS 6.0
- FF works 100%, but IE spews javascript errors on page load

And it's weird, one time i get one error (and this is the common one, btw that line # shown doesn't have anything!):

Other times, IE is totally confused! (i do not have that many lines in that page needless to say)

I've already tried seeing what's going on with Fiddler, not sure what i am exactly looking for, but all looks well in that tools... and just for good measure i uninstalled Atlas on my server and reinstalled it, that didn't help things either

Any ideas? (link again)

So i got by this problem by installing theMicrosoft Script Debugger and seeing what IE was whining about and it was the javascript for Google Analytics causing the above problems (although it makes *no* sense why it worked 100% in FF)

So now I have the "css refresh" problem where IE/Atlas is working, but the whole page's CSS refreshes, i swear i saw a blog post by someone at Microsoft to fix it... gotta track that down

Wednesday, March 21, 2012

WYSIWYG-editor saying that a ScriptManager is not present when it is; throws an exception

Hey Guys,

I'm new to the AJAX Toolkit, so pardon me if my problem seems a bit dumb.

WYSIWYG Exception

As you can see in this image, I have a ScriptManager on the page, so I don't have a hot clue of what's really causing the problem. My HTML is all valid, and I can actually run the page through the built-in server and it works just fine.

Anyone have any ideas?

I'm not so sure but I think this could be caused by a wrong reference to the library that ajax uses (the Web.Extentions).

Try to remove the scriptmanager and just drag a new ScriptManager from the ToolBox to the top of the webpage. Then save the page, close it, and reopen it. Normally the design-view should render normally now.

I hope this helps!

Greets,
Wim