|
when you delete the cookie and refresh the page will be expired, eventhough if it didnot have the connection with ticker.
|
|
|
|
|
While writing a custom combobox component I found that if a developer using the component wanted to "talk" to the component using their own client-side javascript, that they would need to know the actual names/ids for the client-side components that get rendered for my custom component by asp.net. To address this issue, I created a helper object that gets the original id that the developer associated with the custom combobox component, and has properties for the important ones provided by the custom component.
Then I created a list object to keep track of all of the combobox helper objects, so the developer could use: comboboxlist[ name ] to get the combobox helper object of that name, or enumer enumerate the properties like a collection to get to all of the combobox helper objects.
Unfortunately, after adding the combobox helper objects to the comboboxlist, I'm finding that I can't reliably get them back out, as the list appears to be empty.
I'm adding the combobox helper objects using this code:
comboboxlist[ combobox.Name ] = combobox;
Then later in my page, I call my IsComboBoxInList( Name ) function to tell me if the combobox helper object was added. her is the function's code:
function IsComboBoxInList( Name ) {
return ( comboboxlist[ Name ] != comboboxlist.UNDEFINED );
}
The problem is after adding several comboboxes to the list, the function incorrectly returns false, when the alert statement a few lines above this function call is commented out.
If I uncomment the alert statement, it incorrectly prints out a message indicating that the list is empty, but now the IsComboBoxInList function correctly returns true!
Here is the code for the problem area:
var msg = '';
for( var Name in comboboxlist )
msg += '\n ' + Name;
if( msg == '' )
msg = 'none';
if( IsInComboBoxInList( 'ComboBox2' ) ) {
comboboxlist[ 'ComboBox2' ].TextBoxTag.focus();
alert( 'focus using comboboxlist worked.' );
}
Very strange.
The code is over 400 lines, so I don't want to post it all, most of which is used to build the comboboxlist and combobox objects.
Thank you in advance.
|
|
|
|
|
Whatever is happening, it isn't in the code you posted. So, let's try a little psychic debugging...
howardjr wrote: I'm adding the combobox helper objects using this code:
comboboxlist[ combobox.Name ] = combobox;
Obviously, this has to happen prior to the code that checks for it.
howardjr wrote: function IsComboBoxInList( Name ) { return ( comboboxlist[ Name ] != comboboxlist.UNDEFINED ); }
Presumably, comboboxlist.UNDEFINED is either undefined, or set to null or undefined . Anything else is asking for trouble.
howardjr wrote: for( var Name in comboboxlist )
msg += '\n ' + Name;
This will build a string of all property names in comboboxlist, separated by newlines. Since the resulting string is empty, comboboxlist has no properties. Therefore, either there are no combo boxes, or the initialization code hasn't run yet.
howardjr wrote: // alert( 'comboboxes in comboboxlist: ' + msg );
if( IsInComboBoxInList( 'ComboBox2' ) ) {
You say that uncommenting the alert causes the IsInComboBox() condition to evaluate true. Therefore, following the alert, there must exist combo boxes, and the initialization code for comboboxlist must have run.
Check your initialization.
|
|
|
|
|
Thanks for the psychic analysis
I figured out that the problem was I was using a javascrpt url in the onload of an html image to create the combobox helper objects. The javascript url code executed when the graphic finished loading, so the code at the bottom of the page generally would execute before this, and the list would be empty.
The reason uncommenting the alert "fixed" the problem was the images would finish loading and the component's onload events would fire while the pop-up waited for me to press its OK button. Then the rest of the code would see the combobox objects in the list and work properly.
The solution was to move the javascript code to the end of each set of html components rendered by the custom component. This ensured that all of the html components were present and could have their properties assigned by the combobox objects constructor, and the combobo object could be added to the list. Then because all of the initization was completed before the code at the bottom of the page was executed, everything work.
Oh, and comboboxlist.UNDEFINED is undefined. I don't even have it as a property of comboboxlist. I just code the test that way so it would be more obvious what I'm testing for.
Again, thanks for the analysis
|
|
|
|
|
howardjr wrote: Oh, and comboboxlist.UNDEFINED is undefined. I don't even have it as a property of comboboxlist. I just code the test that way so it would be more obvious what I'm testing for.
Obviously that doesn't make it more obvious, just the opposite. If you use a property one would expect that the property actually exists. Who would ever expect you to use a property because it doesn't exist?
---
b { font-weight: normal; }
|
|
|
|
|
What I find strange is while there is a constant for null there isn't one for undefined.
|
|
|
|
|
There is. By nature, it's less useful than null , since referencing an undefined variable results in an error. However, an undefined property can be compared with undefined , and typeof(<variable>) can be used on undefined variables without error.
http://msdn2.microsoft.com/en-US/library/dae3sbk5.aspx[^]
|
|
|
|
|
I am developing a website in asp.net that as a part of its content will contain many short videos. These video many contain fast movement.
In the past I have encoded the video with Real Producer to play with RealPlayer. It seems that flash is now becoming the encoder of choice.
I would be grateful for your options on what file format I should use and what encoding software. I have a limited budget to spend of cheap and functional if perfered.
Thanks in advance
Steve Jowett
|
|
|
|
|
Flash is by far the easiest.
It means that all people need installed to view the movies is flash, no additional software for every format.
And it just works in pretty much every browser.
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
i believe sorrenson is the squasher of choice for flash
|
|
|
|
|
Hi
Actually I am unable to open the pdf file in window server 2003.When i am trying to open the pdf in server windows 2000 it is opening very fine.
when i am trying to use the same code for openening the pdf in windows 2000 or windows 2003 it is opening the pdf no problem with that when i am giving the value for param element of value attribute.
it means strURL="c:\san.pdf"
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" style="height:100%; width: 100%" id="objViewer" name="objViewer" VIEWASTEXT> >
<param name="src" value='<%=strURL%>'>
</object>
But when i am giving the strURL value as we are using the activex control in which our pdf contents are there.
It means strURL="/test/cgi-bin/retrievedoc.exe/parameters." For this EXE we are passing parameters.
Then it is not opening PDF it is becoming blank page.
Can you suggest me where i am wrong.Please.
I am very wonder about this matter. Please help me or guide as soon as possible.
Thanks
sanjay kumar
Sanjay Kumar,
Software Developer
|
|
|
|
|
I'm sorry that this is a bit OT, but it's web eventually development nonetheless. I have a requirement to control Firefox from another application, and it seems to me the best/easiest way is to simply start FF, and then use the local page it loads to control it internally, instead of relying on external XPCOM calls to control it. Am I on the right track?
|
|
|
|
|
When you say "control" what do you mean?
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
Let me explain the whole story. I'm developing a Winforms app in C# for Windows and OS X, through Mono. One of the requirements if HTML editing of user documents. Every forms based HTML editor I have found uses the embedded IE COM component, so we decided to use Firefox, hosting a Javascript based HTML editor, as our document editing window.
Now, when a user chooses to edit a document, I want to start up a very minimal Firefox, with a local HTML page hosting the js control. I want to 'lock down' FF so the user doesn't navigate elsewhere or something, until it's closed (probably connected to save button) and they return to the main application.
|
|
|
|
|
I don't think you can lock FF down too easily, but If I understand what you want to do then I think a good work around would be:
Use AJAX to call the editor:
Get a div and display it so it takes over the whole page:
Display Editor:
Then do the reverse when closing the editor.
Basically what you would get there is the whole page unusable except for the editor.
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
I think you misunderstood me. I have an offline, Windows Forms app for which I cannot find an HTML editor that will work on the Mac. I plan to pop FF up as an edit window, so there isn't any other page to make unusable. However, using the customization features of FF, I would like to remove menu bars etc. so the user cannot use it as a browser.
|
|
|
|
|
A gotcha.
Well I'm not sure if you can force FF to do that directly, but what you could so is have the page load, then have JavaScript open a popup, then close the window.
I must admit though that I haven't often interfaced between a Forms app and a Browser.
Can I ask why you can't built an HTML editor in the app itself?
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
Aha, yes, a popup would be great, thanks.
There are no HTML editor controls that will also work on Mac OS X. All the available editor controls use the embedded IE ActiveX control.
BTW, the entire layout etc. for FF is defined as markup, and has its own DOM, so I am confident that with time (the crux) I could make FF my slave. Mmmwooohhhahahahaha.
|
|
|
|
|
Brady Kelly wrote: I could make FF my slave. Mmmwooohhhahahahaha.
SSSSSSHHHHH, the was Microsoft's "Secret" plan!
And no problem, glad to help.
Need anything else?
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
Bradml wrote: Need anything else?
Not right now, but thanks for your advice so far. I'll post here again if I do.
|
|
|
|
|
I want to learn about browsers, mostly on internet explorer, how they took a page data and render it to client. And want to get performance tips for making more faster pages by learning explorer ways of doign its job.
I want to find answers of question like...
--> which one is best fast for ie .. using divs or tables to layout conttent?
--> when to include style data in page or when to put style on a css file?
--> how to find javascript usage of cpu and ram on a page, and compare with each other?
--> does flash object is bad for rendering speed of a page?
--> which doctype is best, in which stuation
--> is it really helps giving all dimension, like height, to tags that explore do not need to think about it.
--> how many percent of a page elemnets takes total time of rendering all elements.
....
and so on..
Please send any urls, or clues on the subject, and give your opinions.
thanks.
karanba
|
|
|
|
|
karanba wrote: --> which one is best fast for ie .. using divs or tables to layout conttent?
Honestly you would need to be formatting an insane amount of data to really see the difference, but divs can be processed slightly faster because they are each individual objects, a table is completely constructed before it is shown to the user.
karanba wrote: --> when to include style data in page or when to put style on a css file?
If you have a lot of pages that use the same styling then CSS is faster, because it is downloaded once. Otherwise embedded CSS is faster on a per page basis.
karanba wrote: --> how to find javascript usage of cpu and ram on a page, and compare with each other?
I don't think you can, but JavaScript rarely takes up too much CPU/Ram.
karanba wrote: --> does flash object is bad for rendering speed of a page?
Flash will slow download, but once down the rendering is nto affected. Just make sure it loads into an area with a predefined size.
karanba wrote: --> which doctype is best, in which stuation
This really depends on how structured you code is. If you think that you can make a XHTML page with no problems, then use it, otherwise use transitional.
karanba wrote: --> is it really helps giving all dimension, like height, to tags that explore do not need to think about it.
It depends on what you are rendering, if it is dynamic text which does not have a height limitation then leave it, else set it and set the overflow/
karanba wrote: --> how many percent of a page elemnets takes total time of rendering all elements.
Hope that helped. Want to know anything else?
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
thanks this answer really help..but I want more.. I go on key rendering engine for browsers but could not catch any good resource also no resource about that. what could be the key word for this subjects to searc for.
karanba
|
|
|
|
|
Honestly the documentation in this area is very poor.
If you had to look something up then probably research:
1. Cache
That is pretty much the key to the fastest pages.
One thing you have to realize is that once the browser receives all the information the rendering takes milliseconds.
I'll give you a hint that will help you speed up your download/rendering times. Research how to properly deploy a XML/XSLT solution. What this does is put all the rendering and formating information in one place(this can even make menus, banners, footers, etc) and it is only downloaded once by the user.
Then you make every page in XML with little/no formating. This means that only the unique content for every page is downloaded. The XSLT is only downloaded once and then stored in the Cache.
If you need information in more specific areas I'd be happy to help.
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
I want a javascipt code for calender
on which display current date and I can navigate to any month and year.
plz help me.
Bharat Bhusanam
|
|
|
|