w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Using jscript / jquery in a div
since the contents of file2 is loaded using a post command the widgets inside file2 has to be initialized after the dom is loaded with the content. From what I understood you have an input field with id datepicker1 in file1 and file2, it is invalid because element id should be unique in a document, I would recommend adding a class called data-picker to file2 input field. then try function autoSubmit() { $.post('file2.php', $('form[name="report"]').serialize(), function (output) { $('#info').html(output).show(); $('#info').find('.date-picker').datepicker(); }); } UPDATE: if the following script is present in file2 then $(function() { $( "#datepicker1" ).datepicker(); }); you need to move the script to bottom of the page, ie after the input element is added a

Categories : PHP

XML Attribute Starts With, in JScript, with IE
Use var doc = xDataSpc.responseXML; doc.setProperty('SelectionLanguage', 'XPath'); then you can use your doc.selectSingleNode("//rs:data/z:row[starts-with( @SpcID, '3.']") without problems. The default selection language with MSXML 3 is not the XPath 1.0 standard defined by the W3C but an older draft that these days only Microsoft supports.

Categories : Javascript

htaccess blocking css and jscript
This rule here: RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !/(checkout.php|final.php|admin/(.*))$ RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Is redirecting HTTPS requests to HTTP, and chrome is probably complaining about it because a secure page (HTTPS) is loading an insecure script (HTTP). Your script is loaded via a URI, so the protocol is HTTPS, and that rule is redirecting it to HTTP. Try adding an exception for css and js to that rule: RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !/(checkout.php|final.php|admin/(.*))$ RewriteCond %{REQUEST_URI} !.(css|js)$ [NC] RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Categories : Apache

button in jquery and jscript
jQuery is library of javascript function and you need to add jquery file in html file that y jquery function was not working and for javacript function you need to change the setting in jfiddele left to no-wrap in head http://jsfiddle.net/aLhb8/1/ http://jsfiddle.net/hushme/QaHda/10/ here is code $("button").on("click", function () { $("p").text("this text will now appear!!") });

Categories : Javascript

Jscript + jquery + an example of basic difference
.text() sets the text, not the HTML. Use .html() instead: $("#question").html("<b>Question " + questionIndex +"</b>: " + allQuestions[0][questionIndex-1]) Also, JScript isn't JavaScript. You probably mean JavaScript.

Categories : Javascript

JScript confirm infinite loop?
Your comment is incorrect. r = true doesn't test whether r is true; it assigns r to become true. You need to compare the variable using the === operator. Or you can just write while(r), since r itself is already true.

Categories : Javascript

JScript Code Won't average numbers
Update: JS Fiddle link for working, extremely simplified code using a single function and no outside variables: http://jsfiddle.net/cookies/kZZeY/ As you change the numbers in any of the boxes, the average is updated while you type. Note: I am not answering this for the purpose of doing homework, as I suspect this question might be, but because it is worthwhile to show some form handling methods in this answer because such techniques are of great general usefulness in many applications. Some of these techniques are: using this in the way it begs to be used in form event handlers iterating through form elements instead of using error-prone multiple variables (like var numberTwo = document.numbers.numTwo.value; var numberThree = document.numbers.numThree

Categories : Javascript

resize a div element according to its content without jscript
I think this is what you're going for. Not sure but this is what I got. http://jsfiddle.net/gulfarazyasin/BQfN3/ div#container { border: 1px solid black; height: 250px; width: 300px; overflow: auto; white-space: nowrap; } div#container div#divTexto { border: 1px solid blue; height: 200px; display: inline-block; margin: 0 20px; } div#red { border: 1px solid red; margin: 10px; display: inline-block; } Add/Remove #divTexto to see the desired effect

Categories : HTML

Detect if JScript is running elevated?
OK. I think I got it. Thanks to this poster, this seems to work: function isRunningElevated() { //Checks if this scrpt is running elevated //RETURN: // = 'true' if yes var res = runCommandNoWindow("net session"); return res === 0; } function runCommandNoWindow(strCmd) { //Run command //RETURN: // = Integer returned by the command var res = null; try { var oShell = WScript.CreateObject("WScript.Shell"); res = oShell.Run(strCmd, 0, true); //No window, wait to finish! } catch(e) { //Failed res = null; } return res; }

Categories : Javascript

JScript try catch network exception
I have found the error. The error came from the "Log". First, not every time a new "File System object" must be created. It can be simply used the object "fso". In addition, the open text file must be closed at the end of the function. Here is the correction: function Log(msg) { a = fso.OpenTextFile("Debug.log", 8, true, 0); line = "[" + CurrentTime()+ "] "; line += "[" + WScript.ScriptName + "] "; line += "[" + msg + "]"; a.WriteLine(line); a.Close(); }

Categories : Javascript

Jscript to check defined array
Based on the limited info provided, here is what I can suggest. //collect top 10 cat from array catArray.sort(sort_by("count", false, function (a) { return parseInt(a) })); var categorytop10 = new Array(); var categorytop10Count = new Array(); for (var i = 0; i < 10 && i < catArray.length; ++i) { categorytop10.push( catArray[i]["tier3"] ); categorytop10Count.push( catArray[i]["count"] ); } EDIT: You can also try this //collect top 10 cat from array catArray.sort(sort_by("count", false, function (a) { return parseInt(a) })); var categorytop10 = new Array(); var categorytop10Count = new Array(); for (var i = 0; i < 10; ++i) { if (i < catArray.length) { categorytop10.push( catArray[i]["tier3"] ); categorytop10Count.

Categories : Misc

Expected ';' when trying to run excel macro with jscript
The only line I see that is missing a semi-colon is your call to window.alert(): window.alert("Filled Sheet Just Fine") Just add it back and I'm guessing you'll be fine.

Categories : Javascript

Unable to validate the month and year using jscript
You can't use DateTime.Now! It's Javascript, not C# there!!! Use these values: var today = new Date(); --var dd = today.getDate(); var mm = today.getMonth()+1; //January is 0! var yyyy = today.getFullYear(); if (year < yyyy || (year == yyyy && month < mm)) { ... } else { ... } And it would be interesting to know why you were trying to do: month<DateTime.Now.Year, comparing a month with an year! Technically an if just to set a bool variable is a waste of space! args.IsValid = !(year < yyyy || (year == yyyy && month < mm));

Categories : C#

Why is using JScript for implementing custom actions in WiX not recommended?
Rob Mensching has a great post exactly about this topic. A summary of why it is a bad idea: Robust code is difficult write in script Debugging script in the Windows Installer is difficult Anti-virus products kill them See details by the link above.

Categories : Wix

What are the functional differences between JScript, JavaScript, and ECMA Script?
A implementation of the EMCAScript standard is more than code that brings the specification rules to life. The ECMAScript standard is deliberately incomplete: Each Web browser and server that supports ECMAScript supplies its own host environment, completing the ECMAScript execution environment. An ECMAScript implementation must supply a "host environment". In the case of a Web browser, that host environment includes DOM manipulation APIs and other APIs specified by the W3C and WHATWG. The behaviors of (indeed, the existence of) these APIs are not specified by ECMAScript. Objects used to complete the "host environment" of an implementation are called "host objects". Host objects are not bound to follow normal object rules: they may throw errors for property access that would be valid

Categories : Javascript

Keep caret position in contenteditable after editing the content via jscript
You could create an abstraction that would add special characters to otherwise readable regexes. It's simple and presumably requires minimal changes to your current code. There might be a more elegant solution though. If you never replace text that has a caret in a middle of it - as in repl|aced - you could split the original string into two and apply the filter on both parts. The caret position remains at the division, that is at length of the first gist. If you do however need to replace even at caret position, you could start with the split anyway. After that, run the filters again, one by one. If the filter matched, move caret to a predetermined relative position - say to replaced ++|+ (pipe denoting the caret) with ××. You could even let it be, which would result in ××|. Or have

Categories : Javascript

Sorting a JScript Array on a String Field with leading No.s
Just use javascript array.sort() code would look like this: this.items.sort() Heres a link: Javascript sort reference

Categories : Javascript

Squared² Character in file path for Jscript launch
How about using the short filename instead? You should be able to convert the whole path to an MS-DOS-compatible path, which shouldn't include the pesky superscript 2, and use that instead. Theres another stackoverflow question asking how to convert a full path to a short path, and the simplest answer seems to be to run this in a cmd terminal in the directory in question: for /d %I in (*) do @echo %~sI The Microsoft support site also covers this topic. Converting the directory name in question to the short form should yield this path: C:Program FilesMCSOFT~1ice.exe or C:Program Files (x86)MCSOFT~1ice.exe

Categories : Javascript

Unable to update Excel sheet in TestComplete via JScript
The string literal in sSQLQuery = UPDATE [TC_PlaceVectorOrder_001$] SET [Result] = Pass where [No] = 1; must be quoted: sSQLQuery = "UPDATE [TC_PlaceVectorOrder_001$] SET [Result] = Pass where [No] = 1"; Then it's obious that "Pass" is meant either as a literal string/varchar value or a variable containing the value to be stored. In the first case, try sSQLQuery = "UPDATE [TC_PlaceVectorOrder_001$] SET [Result] = 'Pass' where [No] = 1"; in the second, try sSQLQuery = "UPDATE [TC_PlaceVectorOrder_001$] SET [Result] = '" + Pass + "' where [No] = 1"; An UPDATE query should not return a resultset; so just execute: objConn.Execute(sSQLQuery);

Categories : Excel

Microsoft JScript runtime error: path not found
What version of PhoneGap? I think there was a bug that was fixed in versions 2.2 or around there. If you download 2.8 or 3.0 that issue should be fixed. To go further, check that the folders you are trying to create are set up correct. The documentation around this is pretty weak and the CLI tools are very unforgiving, but I find that certain folders must be there and certain folders must not be there. For me, I hit just about every issue. The project name is used as a class name and a folder name so make sure you choose something that will be a valid class name. The last path of the project path must not exist, but any intermediate paths must exist. In this cmd, everything up to TestProj must exist but trunk must not exist. bin> create C:ProjectsCordovaTestProj runk com.company.testproj

Categories : Android

asp.net jscript Error: Unable to get property 'value' of undefined or null reference
You aren't passing any parameters when calling your client function. Therefore, both of its declared parameters are undefined. You probably want to pass this as a parameter when you call it in the inline event handler.

Categories : C#

How can I access a collection returned from a CSharp COM object in Classic ASP JScript?
What you can do is return a hand made collection, like this: [ComVisible(true)] // may be optional depending on your other assembly settings public class ResultList { private List<Result> _innerList; internal ResultList(...parameters...) { _innerList = ... } public int Count { get { return _innerList.Count; } } public Result this[int index] // will be named "Item" in COM's world { get { return _innerList[index]; } } } That you can use like this: var results = oMyObject.GetResults(); for (var i = 0; i < results.Count; i++) { Response.Write("<br /><i>('" + results.Item(i).Value + "', '" + results.Item(i).ID + "')</i>"); }

Categories : C#

JScript Runtime Error in ASP.net MVC 3 after placing the javascript in a separate JS File
The script containing this displayTime function should be placed in your <head> section. Alternatively since you are using jQuery, why don't you simply use the $(document).ready function?

Categories : C#

Microsoft JScript runtime error: Object required in form
This error is usually appears when the getElementById is return null on the parametre, and you then try to use that parameter. For example on this line, you probably did not find the ddlTopSearch var dT=document.getElementById("ddlTopSearch").value; because asp.net render it on page diferently, to get it correct/rendered ID use the ClientID as: var dT=document.getElementById("<%=ddlTopSearch.ClientID%>").value; The same with the rest ids. Also, I must note here that the Drop Down List did not get the value as the rest of input controls. To get the value you must use this javascript code: var e = document.getElementById("<%=ddlTopSearch.ClientID%>"); var sTopSearchValue = e.options[e.selectedIndex].value; reference: How to get the selected value of dropdownlist using

Categories : C#

PayPal jscript: Single form: send multiple items with dropdown quantities = 0?
The undefined_quantity variable is only available to Buy Now buttons - not cart buttons. It's used to determine whether or not an item has a changeable quantity. Where the buyer can pick the amount of items they want to purchase on the checkout page. The variable I believe you're looking for is quantity_x. The value would determine the number of items the buyer is purchasing.

Categories : HTML

Microsoft JScript runtime error: 'data.EmployeeDetails.EmployeeId' is null or not an object`
OK, I read through your post again and you want to submit the form when click on the button actually. So, let's try to put the value in the session Session["enteringValue"] = model.EnteredValue; And you can retrieve it using string enteredValueId = (string)(Session["enteringValue"]);

Categories : C#

How to match a question mark?
Use quotemeta for the regex pattern. use warnings; use strict; my $search = quotemeta 'http://shorturl.com/detail.cfm?color=blue'; my $replace = 'http://shorturl.com/detaila.aspx?color=red'; my $file = '<a href="http://shorturl.com/detail.cfm?color=blue" class="news">HI</a>'; $file =~ s/$search/$replace/gis; print $file; __END__ <a href="http://shorturl.com/detaila.aspx?color=red" class="news">HI</a>

Categories : Regex

C++ spanish question mark
this character is simply not included in basic ascii. Try using wstring http://www.cplusplus.com/reference/string/wstring/

Categories : C++

Flowplayer question mark
A question mark URL encodes as %3F. But you should use a proper encoder for the whole thing rather than manually encoding a specific character. Depending on the server-side technology you're using to build the Urls, tyhere should be a function like UrlEncode() which should handle all this for you. Failing that, Javascript has encodeUriComponent()

Categories : Misc

MySQL - question marks
Your database table column should be created with proper charset and collation. You can define theit while creating or altering a table: col_name {CHAR | VARCHAR | TEXT} (col_length) [CHARACTER SET charset_name] [COLLATE collation_name] Here is the mysql link to help you learn more about it: http://dev.mysql.com/doc/refman/5.0/en/charset-column.html

Categories : Java

Microsoft JScript runtime error: Unable to get value of the property 'innerHTML': object is null or undefined
Most likely this is failing because the following line var panel = document.getElementById("<%=pnlContents.ClientID %>"); Doesn't return a valid element. I would debug it to verify

Categories : Javascript

Microsoft JScript runtime error: Unable to get value of the property 'toLowerCase': object is null or undefined
Change your condition to if (IsReviewable && IsReviewable.toLowerCase() == "true" && currentLocale()=="en-us" ) This will make sure the value is not falsy and only then apply the toLowerCase method

Categories : Jquery

mod rewrite question mark and ampersands
I think the issue here is that in your RewriteRule you're trying to match a part of the query string, which isn't possible. If I understand your problem correctly, you want requests to http://example.com/category/general?type=pages&v=1 to be interpreted by the server as http://example.com/category.php?c=general&type=pages&query=1? To match a query string, you need to prefix your rule with a condition. The following should work: RewriteCond %{QUERY_STRING} type=([^&]+) RewriteCond %{QUERY_STRING} v=([^&]+) RewriteRule ^category/([^/]+) /category.php?c=$1&type=%1&query=%2 The first two lines are pre-conditions that state that the requested URL needs to have both type= and v= as part of the query string. The final line rewrites the request. This means that

Categories : PHP

Can't read a file that contains a question mark in name
As long as the file exists, there is no problem opening a file like this: folder_file = './temp directory/file-?.txt' File.open(folder_file, 'r').close This works fine. See Tin Man's suggestion about how to actually open the .tif file. As you can see, I created the following file myster-file_char?.txt $: ls get_listing.rb myster-file_char?.txt You can get this stored in a variable, though I only use Dir.glob here to view it. puts Dir.glob("**.*").inspect Everything is now revealed in what character it is. Though I should be able to use it directly as is to open and edit the file in Ruby. Though like The Tin Man stated, you are asking about a binary file. $: ruby get_listing.rb ["myster-file_charu0016.txt", "get_listing.rb"] The character that is actually there is a CTRL

Categories : Ruby

How to remove question mark in a JOptionPane?
Use the PLAIN_MESSAGE message type JOptionPane.showConfirmDialog(null, "Help", "Please Enter X and Y Values", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

Categories : Java

What may cause question marks instead of non-ASCII symbols?
You need to change the character set of the database to UTF-8 or a character set for Cyrillic characters. Latin-1 can't encode Cyrillic characters and that's why they're appearing as question marks in the database. edit: I just saw you're declaring the table with UTF-8 character set, so I'm stumped.

Categories : PHP

What to do with Question Marks in HTAccess Redirects
If it's a single link you want to change you don't need a htaccess rule for that you can just do a redirect. redirect 301 /wordpress/?p=250 http://www.othersite.com/blog If the URL parameter changes you can use this rule. RewriteEngine on RewriteRule ^wordpress/(.*) http://www.othersite.com/blog [R=301,QSA,NC,L] Note that when you use the QSA flag it will append the URL with the query parameter so if that's what you want the resulting URL will be. http://www.othersite.com/blog?p=250 Otherwise if you remove the QSA flag, then it will just redirect to this http://www.othersite.com/blog

Categories : String

Check if last character is a question mark
if (substr(rtrim($link), -1) != "?") { // Do stuff } Giving a negative start value to substr() makes it count from the end instead of the beginning.

Categories : PHP

URLRewrite rule for a URL that only contains one value after the question mark
Try this code. Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} ^([a-z0-9-]+)$ [NC] RewriteRule ^$ /#!/videos:%1? [L,R=301,NE]

Categories : Htaccess

R - how does the "question mark" function works?
You can make functions and variables with arbitrary names, via use of the backtick `. `~` <- `+` y <- 5 x <- 10 y ~ x # 15 I wouldn't mess with ~ though, unless you don't intend to do any statistical modelling....

Categories : R



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.