w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
I am trying to find specific links on users desktops and create a file logging the results
To prove that the FSO does not expand environment strings automagically: Dim oFS : Set oFS = CreateObject("Scripting.FileSystemObject") Dim oWS : Set oWS = CreateObject("WScript.Shell") Dim sPath sPath = "%windir%addins" WScript.Echo qq(sPath), CStr(oFS.FolderExists(sPath)) sPath = oWS.ExpandEnvironmentStrings("%windir%addins") WScript.Echo qq(sPath), CStr(oFS.FolderExists(sPath)) output: "%windir%addins" False "C:WINDOWSaddins" True So put some work into feeding a valid path to .GetFolder().

Categories : Vbscript

.htaccess + PHP to create dynamic Facebook-type navigation with some fixed links?
Rerouting can be done with htaccess. All files, directories and symlinks will still be accessible, everything else is redirected to (in this case) index.php. RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] What you probably want is to do some asynchronous loading with ajax. This is completly independent of any .htaccess rerouting. For the ajax part: You could set a special css class to all links that should use ajax loading. Then use jQuery selector looking for this special class. You can set an on link click event that loads via ajax aswell. You'll probably want to use on of the bigger javascript frameworks like jQuery for this. By checking the

Categories : PHP

JQuery/javascript: Dynamic gallery's images can be used as links but not as buttons. Why?
You need to prevent the default click behavior the plugin is trying to fire. $("#monja").click(function(e) { e.preventDefault(); alert('it works'); }); For more info as to how this works, check out Event Bubbling.

Categories : Javascript

Tracking outbound links using ajax (javascript)
With jquery: $('a').click(function(e) { //check that it is offsite if($(this).attr("href").indexOf("http")==1) { //prevent the redirect; e.preventDefault(); //do your tracking $.ajax{ url: 'yourtracking.php', data: "link=" + $(this).attr("href"), complete: function(){ //now do the redirect window.location = $(this).attr("href"); } } } });

Categories : PHP

How to create dynamic table using the results
row += "$('<td>').append("+dataString[i]+")"; or var row = $('<tr>'); for(var i = 0; i < n; i++) { row.append($('<td>').html(dataString[i])); } $('#results').append(row);

Categories : PHP

Calling External Dynamic Links from VBulletin > Need Links to Open in Base Target iFrame
Asuming all of this is on the same domain, and that your target iframe had an id like <iframe id="openlinkshere"> You could add a handler on your links like this: <script type="text/javascript" src="http://[VBulletin]/external.php?forumids=1&type=js"> </script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 5; x++) { document.writeln("<a onclick="top.document.getElementById('openlinkshere').location.href = this.href; return false;" href="http://[VBulletin]/showthread.php?t=" +threads[x].threadid+"">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />"); } </script> This would open the link on your target iframe top.document.getElementById('openlinkshere').location.href = this.href; This stops

Categories : Javascript

Creating dynamic search results and filters - should I use Javascript?
JavaScript is definitely the way to go. You will need ajax. A front end JS templating library would help to display the results. I would create a JSON web service. Fetch the search results over AJAX and use a frontend templating engine. There are many out there. This linkedin article may be of help selecting. Edit: What does a templating library do? It will allow you to define a set of tags to display each search result. When you fetch the data using JSON, you convert this to javascript objects. Your templating framework will generate the html using your result template to display all the values. If you are not familiar with javascript templating, definitely read about it. Once you know it, you will find yourself applying them in a lot of solutions. I am not recommending any particular

Categories : PHP

How to create a dynamic 2D array in javascript
If you mean an object (as in your example), and want to use variables as keys, you'll have to split the declaration in multiple lines, and use bracket notation: var tblObj = { main1: {}, main2: {} }; tblObj.main1[var2] = var3; tblObj.main1[var3] = var4; tblObj.main2[var5] = var6; (Assuming all those variables are already defined.)

Categories : Javascript

Posting back a dynamic list model to controller using AJAX and javascript
If you want to pass the model on view to the controller using ajax call you can use data: $('form').serialize() You can specify id to form and pass id of the form as data: $('#myform').serialize()

Categories : Javascript

How to create dynamic call to javascript function
Do these function live in the global context? If so, you could use this: for( var i=1; i<=4; i++ ){ window["create_account" + i](); } FYI: If you want to test this in a jsFiddle, be sure to not use the onLoad or onDomready wrap settings of jsFiddle. If you try to use them, your functions will become nested ones which obviously don't belong to the window object anymore.

Categories : Javascript

Create a dynamic unordered list using a Javascript function
Using data from the question you posted yesterday (converted to JavaScript), you can create a DOM Tree of the nodes you want like this (assuming all parent nodes are listed before their children) function generateList(data) { var i, item, ref = {}, counts = {}; function ul() {return document.createElement('ul');} function li(text) { var e = document.createElement('li'); e.appendChild(document.createTextNode(text)); return e; } ref[0] = ul(); counts[0] = 1; for (i = 0; i < data.length; ++i) { ref[data[i].parentId].appendChild(li(data[i]['name'])); // create <li> ref[data[i].id] = ul(); // assume + create <ul> ref[data[i].parentId].appendChild(ref[data[i].id]); counts[data[i].id] = 0;

Categories : Javascript

How to create a dynamic html list with recursive function in Javascript (jQuery)
I think the problem is just in your for loop: for(i = 0; i < nbr; i++) should be: for(var i=0; i<nbr; i++) Essentially, all calls of the generateHtml(...) function are sharing the same loop variable (i). Therefore, when a sub-call increments i the calling loops i also increments. By adding var you ensure that each call has it's own local variable.

Categories : Javascript

How to create non-ajax post request in javascript?
I believe you won't actually take much a performance hit doing it the way you are. The big issues with editing the DOM is actually adding to the document as it requires re-rendering and stuff.

Categories : Javascript

How can I create a static library that links against another library and can be used by a third program that links both the libraries?
Is this possible? No, this simply can not be done with archive libraries (it can be done with shared libraries but requires great care to avoid symbol collisions).

Categories : Gcc

tag results in multiple links sent to browser
When I inspected using Firefox, it turns out that you are not closing the <a> tag, and may be thats the culprit there. And you CANNOT self-close an a tag So it should be <p>&copy; @DateTime.Now.Year - BizTalkers ltd <a href="~/home/terms">Terms & Conditions</a> <-- Here </p>

Categories : HTML

How to do dynamic downloads links
I'm not 100% on how you're trying to return the information but this will take a SqlDataReader and add each row in the data reader response to a new row in a table and build up a HTML string. StringBuilder sb = new StringBuilder(); sb.Append("<table><th>Date</th><th>Name</th><th>View</th><th>Download</th>"); while (sqlDataReader.Read()) { sb.Append(string.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td><a href='{3}' download>Download</a></td></tr>", sqlDataReader["Date"], sqlDataReader["Name"], sqlDataReader["LocationSource"], sqlDataReader["LocationSource"])); } sb.Append("</ta

Categories : C#

Dynamic Drop-Down with Links
Simple, add a value attribute to your options, such as: <option value="http://www.google.com">Option 3 ITEM LINK</option> Create a change event: $("select").change(function() { window.location.href = this.value; });

Categories : PHP

Dynamic Links in php and mysql
Try : <a href ="glossary.php?clickedletter=A">A</a> $clickedletter=$_GET['clickedletter']; letter_query = "SELECT * FROM Glossary WHERE Letter =$clickedletter; letter_id = mysql_query($letter_query) or die(mysql_error); $row = mysql_fetch_assoc($letter_id);

Categories : PHP

Give different links to results fetched from sql query
Once your php retrieves the data for the restaurant, just echo some <a href links into the output response. If you are using AJAX to make this query then the client should take the html response and append it to an element on the page.

Categories : SQL

Knockout.js dynamic links do not click through
You are on the right track with Also, of note, I have tried adding a click: function(){ return true; } as well, and that didn't help either. But in itself the click: function(){ return true; } is not enough because the click event will still bubble up so you need to use the clickBubble: false option (see in also in the documentation): <a target="_blank" data-bind="attr: {href: imgUrl}, click: function() { return true;}, clickBubble: false"> <img class="imgThumb" data-bind="attr: {src: imgUrl}"/> </a> Demo JSFiddle. By the way your click binding on the body element "steals" your click event: <body style="padding-top: 100px;" data-bind="click: modalKiller">. So if return true from your modalKiller handler it also fixes your problem.

Categories : Javascript

Force a group of dynamic links to hold still?
Give each link a fixed width. (JSFiddle) Assuming you won't have any pages higher than 999, set the width of each link to assume it as 3 digits in there. I'd do it with CSS by making the link a block level element, specifying a width, and centering it--though you may want it to be right/left aligned. If you support newer browsers, you can do inline-block, but if not, you can set display:block and then float:left: a { display: inline-block; width: 1.5em; text-align:center; }

Categories : HTML

How to make a dynamic php website with permanent links?
What you need - is to use HTML anchors together with ajax navigation. When you load something with ajax, modify anchor. This will not reload page, but will give you really new window.location. When page is loaded without ajax, parse that anchor (if exists) to determine what ajax page to display. That is basic idea, a direction for your thoughts since I do not know the details of your project implementation. Loading with AJAX and going to anchor in loaded content

Categories : PHP

Dynamic links linking to root domain
Make sure that the base URL is always the full URL, including the scheme and a subdomain (if applicable). So: $base_url = "http://livesite.com"; $base_url = "http://localhost/john/customerX"; $base_url = "https://secure.livesite.com"; If all your links are prefix by the base URL you should be fine. Note that in all URLs I left off the trailing /. You can chose to include it, just make sure you always do it in the same way - have a clear normalized form.

Categories : PHP

Dynamic Title of page? PHP include links?
To output the return value of your function in the title tags just put it this way : <title><?php echo findCurrentPageURL(); ?></title> in a php page. Also to split it as you want, see Orangepill comment to the question, linking your question to Split camelCase word into words with php preg_match (Regular Expression) .

Categories : PHP

AngularJS intercept links on dynamic content
If you want it to work the angular way then you need to convert the html into an angular template. You can do this using the $compile service. I had a crack at this you can view the result here. It just uses some regex to find an hrefs, then replaces them with an ng-click. It then uses the compile service to turn it into an angular element and then adds it to the output. It is not the most elegant of solutions but it does the trick. Probably in this situation I would just use a jQuery $('a').click() as there is no real value doing it in angular.

Categories : Angularjs

Search for pattern in web page links and store results to array
Use the Uri Class with it's Query property Uri baseUri = new Uri ("http://www.contoso.com/"); Uri myUri = new Uri (baseUri, "catalog/shownew.htm?date=today"); Console.WriteLine (myUri.Query); //outputs "?date=today"

Categories : C#

Jquery 'gallery' interaction results in broken image links
The tutorial uses the rel attribute because the event handler it uses is tied to .galImg, which is an anchor element with a rel attribute: <a href="#" rel="http://farm1.staticflickr.com/148/369304411_917e112a9d.jpg" class="galImg"><img src="http://farm1.staticflickr.com/148/369304411_917e112a9d_s.jpg" class="thumb" border="0"/></a> The divs with class .thumb that you have don't have the rel attribute, so it ends up setting the image src to undefined. The .thumb click event handler you have should instead go find the nested image's src attribute, like in the following: $(".thumb").click(function(){ var image = $(this).find('img').attr('src'); // child element src $('#content_bar').fadeOut("fast"); /*THIS IS THE LINE THAT SHOULD SWAP IMG SRC*/ $('#conte

Categories : Jquery

Ajax links not working
I think by default rails-3 uses jQuery 1.9.1 (or that's the least, can't remember!). The live method was removed in version 1.9 http://api.jquery.com/live/. You should be using on http://api.jquery.com/on/ instead: //application.js $(function() { $("#patientenajax th a, #patientenajax .pagination a").on("click", function(){ $.getScript(this.href); return false; }); });

Categories : Jquery

how to handle links path in a dynamic site using mod_rewrite for clean url
Try this and see how it works for your ajax or use the full path. function ajax(){ $.ajax({ type:'POST', url:'/index.php', data:{t:t}, success:function(data){ if(data){ alert(data); } } }); } Then in your .htaccess use this. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-z0-9.]+)$ page.php?uri=$1

Categories : PHP

Rails 4 TurboLinks and jQuery Dynamic Links Not Playing Nice
Turbo links uses AJAX which means any dynamically generated elements never get their ready events assigned (because the page isn't technically loading after the first load). Instead, you need to listen to the top DOM element body or document and then specify a selector for the dynamic element to listen to: $('body').on('click', '.remove_line_items', function(e) { ... }); (More Details)

Categories : Jquery

Imported Links don't work (AJAX)
Use: $(document).on('click', '.address', function(){ alert('something'); }); Instead of: $('.address').click(function(){ alert('something'); });

Categories : PHP

How to create a dynamic table in a dynamic cell?
just a suggestion. Rather than using javascript for doing creating table, why not create the table in the HTML. Get that table in a var using Document.getElementByID. create new string variable like "thisRow" and add the HTML code in the string of the variable like thisRow += "rowcellinner table" and then use .append(thisRow); you can assign the value to thisRow variable in each counter of the loop and append it to table. I find this easier to do.

Categories : Javascript

Cakephp Ajax pagination links doesnt work
Add this line at the top of your view file. $this->Paginator->options(array( 'update' => '#content', 'evalScripts' => true, )); Here you have to update the whole table instead of only one row i.e. #content2 <div class="portlet box green Report index"> <div class="portlet-title"> <div class="caption"><i class="icon-globe"></i>Report Summary</div> <div class="tools"> <a href="javascript:;" class="collapse"></a> </div> </div> <div class="portlet-body"> <div id="content"> <table class="table table-striped table-bordered table-hover table-full-width" id="sample_1"> <thead> <t

Categories : PHP

Mask Navbar-fixed-top links on ajax loader
if z-index of your navbar for example is : 10, you must specified z-index: 11 for your loader image Demo

Categories : Jquery

jQuery Mobile ajax links not working properly in ASP.NET MVC application
Add the data-ajax='false' on the links who were responsible for redirect you to another page. JQuery Mobile uses AJAX navigation unless you tell it otherwise. The ASP.NET redirects have no problem to normal requests, but cause issues with AJAX. So my answer in this case is to turn off AJAX. For that, all you have to do is add the attribute data-ajax='false' to the tag. In my case, an easy solution could be (as changing each Html.ActionLink/Url.Action is time consuming), adding this at the end of the _Layout.cshtml (just before closing of the 'body' tag). $(document).on('pageinit', function() { $('a').each(function() { $(this).attr("data-ajax", "false"); }); }); That would be fine assuming you don't want jQuery mobile to use any Ajax with links too. You can go ahead and use Ajax

Categories : Asp Net Mvc

How to dynamically create and remove a complex div and get input inside it to create dynamic link and textarea?
you are removing the $div if you click on the save button. How shall it work then? $div.remove(); also, $div is a local variable of another function, make it globally available. var $div; and whithin your function, dont write var $div = but simply $div =

Categories : Jquery

A Comprehensive Regular Expression to find URL, links,page links, website links from HTML Page or String
Have a look here http://regexlib.com/Search.aspx?k=URL&AspxAutoDetectCookieSupport=1 You can find a lot of examples and patterns there and there are a lot of general Regex tutorials and articles. After a quick browse I found this : ([dw-.]+?.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eouw]|s[abcdeghijklmnortuvyz]|t[cdfghjkmnoprtvwz]|u[augkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|pro)(|W(?<!&|=)(?!.s|.{3}).*?))(s|$) Should do the trick, but I'm sure there are more elegant examples on that list.

Categories : C#

Rails create a dropdown of links
You can't have a hyperlink inside an option tag. You could use the id of the row (probably is value of the row) and just do a simple JS redirect to the desired page. See a JS example here: http://stackoverflow.com/a/14453234/217187

Categories : Ruby On Rails

ASP.NET MVC How to create action links based on routing
Yes, whenever you are rendering the link you'll need to specify the title just like you have it. Of course, you could always create a helper method to create these links and just pass in the parameters to ensure you are always including the friendly title. As for the redirect, StackOverflow does a 301 Permanent redirect, not a 302 Temporary. My general approach to this would be as follow: public ActionResult QuestionDetail(int id, string title) { var question = service.GetQuestion(id); if(title != question.Title.ToPrettyUrl()) { var redirUrl = string.Format("/question/{0}/{1}", id, question.Title.ToPrettyUrl()); return RedirectPermanent(redirectUrl); } return View(question) }

Categories : Asp Net Mvc

Create links for custom field query
Not sure what you are looking for but seems to me that you want to show a link for the author posts in a specific page, if so, then you can use (using your query) $query = new WP_Query( array('meta_key'=>'created_by_alias', 'meta_value'=>'somevalue' )); If $query returns result and you have the id then you can use echo get_author_posts_url( $query->posts[0]->ID ); // the `ID` from first row Or for multiple rows, you can loop like if ( $query->have_posts() ) { while ( $query->have_posts() ) { echo get_author_posts_url( get_the_ID() ) . '<br />'; } } Once this link is clicked, then posts will be retrieved and will be shown according to your page hierarchy, if no author template was found then finally the inedx.php will be used. Also, if you need

Categories : Wordpress



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