|
Can we do something with this forum software? When you switch between messages using the keyboard it would be nice to lock the message position. It would be pretty easy to add that functionality. Do you want me to do it?
Fever
|
|
|
|
|
Bugs or suggestions for the Code Project site should go in the Bugs and Suggestions[^] forum.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi
I am working on an existing project inherited from one of these fly by night digital media companies. They probably had some amazing deadline as usual that results in bad website construction.
The developer at the time thought it great to use RequireJS and load every script file used by the solution into the main aspx page. So when you open/launch the website you are presented with a login screen. If you investigate the login page there is a list of script files loaded even if you never get to the subsequent page that use one of these script files. The second problem is that RequireJS also (sometimes) times out and some scripts are not loaded properly.
The problem I have is the following:
I need to strip out the scripts that is not needed at login stage and only include these scripts when needed. This means: still using RequireJS load the common script files in the main aspx and then when navigating to content pages include/append the additional script files without losing the common ones.
How do I accomplish this? Is there a way to sub load scripts?
What I have tried:
- Use require("script1", "script2", "script3"); in main
- Then use require("script4a", "script4b"); to add additional scripts. But this approach removes the common scripts ("script1", "script2", "script3") and only loads ("script4a", "script4b"), and I have 2 references to require.js as well.
|
|
|
|
|
function VB_downloadXML()
dim xmldatawindow
set xmldatawindow = parent.frames(0)
xmldatawindow.User_Valid_GroupOptionsXMLDoc.async = false
xmldatawindow.User_Valid_GroupOptionsXMLDoc.load"User_valid_group_options_Generate_XML.asp"
xmldatawindow.Lookup_Parent_Link_URL="psb_menu.asp"
end function
which function in java script replace the instead of vb script , bec i am getting error in ie8 amd ie9 browser.(The value of the property 'VB_downloadXML' is null or undefined, not a Function object
)
|
|
|
|
|
Good Day all
i am reluctantly maintaining a Classic Asp application that will be re-written in few months to come. i have an issue where i have a Code like this
if(document.frmEntry.optMethod != "undefined")
{
if (document.frmEntry.optMethod.selectedIndex == 0) {
strPrompt=strPrompt+'Please specify the Valuation Method\n';
if ( objFocus == null ) {
objFocus = document.frmEntry.optMethod;
}
}
}
my problem here is that even if document.frmEntry.optMethod is not equal to "undefined" the code still go into the condition as if it was true. i have attached a proof in my debuger.
http://www.vetauinvest.com/Example/IE_DEBUGGER.png[^]
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
modified 3-Aug-14 15:47pm.
|
|
|
|
|
Try using a Falsy check.
The following values are always falsy:
false
0 (zero)
"" (empty string)
null
undefined
NaN (a special Number value meaning Not-a-Number!)
Your code should look like as follows:
if(!document.frmEntry.optMethod)
{
if (document.frmEntry.optMethod.selectedIndex == 0) {
strPrompt=strPrompt+'Please specify the Valuation Method\n';
if ( objFocus == null ) {
objFocus = document.frmEntry.optMethod;
}
}
}
|
|
|
|
|
You are very true about 'false' check, but sometimes it is a good practice to write full code and explicitly state against what are you want to check. It's of course only a matter of maintainability/readability...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
That should be undefined and NOT "undefined" !!!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
The "undefined" shown in the debugger is not a string, so you can't compare it as one.
To really test if your value is undefined, you can use this:
if(typeof document.frmEntry.optMethod != 'undefined')
The typeof operator returns the type of the argument as a string.
|
|
|
|
|
I can't see why use undefined as string - with or without typeof!?
In JavaScript undefined is a value property of the global namespace and yous should use it according to it...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Thank you , this info is enough to solve the issue.
thanks again
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
The typeof for an undefined value is always "undefined". The value undefined being in the global namespace opens up some possible problems:
function madness() {
var a = 'fish', undefined = 'fish';
if(a === undefined) {
}
}
function mistake() {
var a = 'fish';
if(undefined = a) {
}
}
I know these are pretty unlikely scenarios, but better safe than sorry.
In earlier browsers "undefined" was not a testable value so expressions like (a == undefined) would produce the helpful message "undefined is undefined".
|
|
|
|
|
Graham Breach wrote: The typeof for an undefined value is always "undefined".
How that?
var undefined = 'fish';
alert(typeof undefined);
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Yes. If you define undefined as a string variable, then it is no longer undefined and things get confusing.
This is why I was testing the type of the value against the string "undefined" - the string is a constant.
|
|
|
|
|
You can try with remove ("") double quotes OR use ('') single quotes.
modified 9-Sep-14 7:56am.
|
|
|
|
|
I'm reading a tutorial about using selectors in jQuery to modify items on the page. I understand most of it, except I can't figure out why the first line of code below uses a comma to separate the selectors, and the second code line does not. Can anybody tell me when the comma is used and when not?
$('footer, header').slideUp('slow').slideDown('slow');
$('#Sidebar img').fadeTo(5000, 0.1);
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
Thank you.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'm working on a task where given the coordinates of a line from point A to point B, I need to create a polygonal geofence around(50meters) this line (road route) in google maps.
Can some one help with this?
|
|
|
|
|
|
|
Please, I am using two javascript files, which has its own assigned worked, on a php page, however the jquery script stops working while the JSON2 script works.
This is how I implement both on the php page
<script type="text/javascript" src="jquery.min.js" ></script>
<script type="text/javascript" src="JSON2.js" ></script>
The link to the jquery file http://code.jquery.com/jquery-1.11.1.min.js
The link to JSON2.js :
https://raw.githubusercontent.com/douglascrockford/JSON-js/master/json2.js
**Question**
Please, is it possible to use both script on the same page? if yes, please how to I go about it?
Thanks for helping.
|
|
|
|
|
I'm unaware of any issues using the 2 together. It would help if you could tell us what is happening.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
This is what i see in my web console log
SyntaxError: JSON.parse: unexpected character , this is found in th json.js
TypeError: Q[a].exec is not a function , this is also found in the jquery.js
|
|
|
|
|
Does your code have errors?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|