var url = arr[0] + “//
Get the domain name with port number in javascript
var url = arr[0] + “//
Bruce Ng's software development blog
An archive of solutions of programming problems I have faced in my career
Another solution http://sharepoint.stackexchange.com/questions/12792/how-do-i-know-if-the-page-is-in-edit-mode-from-javascript
var inDesignMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value; if (inDesignMode == "1") { // page is in edit mode } else { // page is in browse mode }
Or use the SN tool in VS Developer command prompt.
If the assembly has been deployed to GAC, navigate to the folder containing the assembly and follow the article above, using reflection to load the assembly.
<input type=”checkbox” id=”leCheckBox”>
To check if it’s checked or not, use:
var leCheckBoxIsChecked = $(“#leCheckBox:checked”).length>0;
It will returns true if the checkbox is checked and false otherwise.
To check the checkbox programmatically:
$(“#leCheckBox”).prop(“checked”, “true”);
To uncheck the checkbox programmatically:
$(“#leCheckBox”).removeAttr(“checked”)
Modify php.ini:
xdebug.remote_autostart = 1
xdebug.idekey=”netbeans-xdebug”
In Netbeans, debug a random file, click continue when it breaks at initial breakpoint.
Run the Android app, Netbeans will break when the app sends a request to the php page.
[XDebug]
zend_extension = “C:xamppphpextphp_xdebug.dll”
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = “C:xampptmp”
;xdebug.profiler_output_name = “cachegrind.out.%t-%s”
xdebug.remote_enable = 1
xdebug.remote_handler = “dbgp”
xdebug.remote_host = “127.0.0.1”
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey=”netbeans-xdebug”
;xdebug.trace_output_dir = “C:xampptmp”
make sure the line “zend_extension…” is uncommented andxdebug.remote_enable is set to 1.
xdebug.idekey should be set to be the same as Netbeans’ PHP debug setting, by default it’s “netbeans-xdebug”. Same for remote_port and remote_mode.
Add style overflow:hidden to the tags that have overflow to fix this problem.
2. web gardening is not supported by Sharepoint, so don’t enable it.
get the return value of $statement->execute(). It returns true on success and false on failure.
use $statement->errorInfo(), to find out exactly the error in the query.
Make use of xdebug and netbeans’ debugging capability.
Configure PDO to throw exception when errors occur
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);