lundi 27 juin 2016

I want to add the placeholder attribute to the input within this DIV but it does not have a unique property that I could locate it with

I cannot edit the HTML directly because Squarespace does not allow that, only JS and Jquery can be used.

$("#field city :input").attr('placeholder', 'City');

I tried using this but it doesn't work

<div class="field city">
                <label class="caption"><input class="field-element field-control" name="" x-autocompletetype="" type="text" spellcheck="false" data title="">
                </label>
              </div>

Thanks in advance




iOS Safari prevent copy popover

In an angular web application I need Safari on iPad to not show the popover menu (copy, etc.) it usually shows whenever the user selects text.

I still need the user to be able to select parts of the text, so user-select is not an option. AFAIK -webkit-touch-callout only concerns links so this does not seem to work either.

The text is wrapped inside a div while some parts of the text are wrapped into spans.

Does anyone know how to achieve this?

Cheers




Way to disable Fiddler or Debuggers without complicated routs or user agent treatment

Has any one figured out ways to secure the data or requests that are visible through fiddler especially (possibly confuse it i know it reads pretty accurate).

Just asking in terms of security i wonder if its possible to hide items as much as possible from public view. I have seen ways to hide the web debuggers but fiddler being such a smarty you can break that with it as well for example go to Facebook and hit the dev tools (f12).

This is related to server side code like c#/vb/net obiously on IIS server and any suggestions or ideas hey even practices would be great




FAIL - Application at context path /WebApplication6 could not be started

I can't start my web application. on localhost it works. when I press start FAIL - Application at context path /WebApplication6 could not be started.

in tomcat server it says running false.

web.xml:

     <?xml version="1.0" encoding="UTF-8"?>
 <web-app version="3.1" xmlns="http://ift.tt/19L2NlC" xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/19L2NlC http://ift.tt/1drxgYl">
<servlet>
    <servlet-name>Create</servlet-name>
    <servlet-class>Create</servlet-class>
</servlet>
<servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>NewUserServlet</servlet-name>
    <servlet-class>NewUserServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>SendMessages</servlet-name>
    <servlet-class>SendMessages</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>Create</servlet-name>
    <url-pattern>/Create</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/LoginServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>NewUserServlet</servlet-name>
    <url-pattern>/NewUserServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>SendMessages</servlet-name>
    <url-pattern>/SendMessages</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>

I don't know how to get the error from the server. Please help.




Adding a setting icon on dhtmlXTabBar

I want to add a setting icon

    <i class="fa fa-cog" aria-hidden="true"></i>

on the right top of my tabbar. For the tabbar I use dhtmlXTabBar and have already had three tab on left top

  mainTabbar.addTab("a1", "Viewer",null,null,true);
  mainTabbar.addTab("a2", "Schedule");
  mainTabbar.addTab("a3", "Project");

so can I add the fourth one as an icon on right-top of webpage?




PHP Cut specific string

hy I want grab every filename for example :
I have data

01.jpg02.jpg03.jpg10599335_899600036724556_4656814811345726851_n.jpg11693824_1051832718167953_6310308040295800037_n.jpg11709788_1051835281501030_8503525152567309473_n.jpg12042832_1103685106316047_3711793359145824637_n.jpg

I'm try like this but not working for me

$str = $_POST['name'];
print_r (explode(".jpg", $str));
foreach ($str as $key => $value) {
echo $value.'<br>';
}

enter image description here




Stripping a C# app down to its static web app

We are separating our front end from our back end (C#.NET MVC) so that back-end dev does not block front-end. Instead of a zillion local database updates, I'll be hitting an API.

I've been working in VS up till now, but wish to work in another editor, and be able launch the front-end in a browser directly.

Except that the index page is index.cshtml. There's nothing of note in the index file that requires it to be cshtml, so I could convert it to .html - the only problem is, now launching the app in VS fails because it is only looking for a cshtml file to start, i.e.:

The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
etc.

My question is: what can I do to modify index.cshtml or the server, so that I can load the app in a browser without having to run it through Visual Studio?

This is the current structure in VS, most of which I hope to dispense with:

App.Data.EntityFramework
App.Data.Sql
App.Domain
App.DomainEntities
App.Presentation.Web
    App_Data
    App_Start
    Areas
    Content
        CSS
        js
            apps
            dashboard
                controllers
                views << dashboard files
            store  << 90% of my files are here
                controllers
                views
                services
                etc.
    Controllers
    ControllersApi
    Models
    Providers
    Results
    Views
        Home
            index.cshtml << actual start page

This is where I go to start the app:

https://localhost:44337/#/dashboard