Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to add to a joomla website a sidebar like this site on the left side joomla site with sidebars
How can I do it?
css property 'position:fixed' can be used to stick element to certain
position.
to open stuff in popup try
JHTML::_('behavior.modal');
image
------
<a class="modal" href="/image/path/my-image.jpg" title="Preview Image">
<img src="/images/icon-16-media.png" alt="Preview Image" />
</a>
page
----
<a class="modal" href="/component/mycomponent/?view=myview&layout=mylayout&tmpl=component" rel="{handler: 'iframe', size: {x: 600, y: 400}}" title="Display Definitions">
This is a link to display content
</a>
load div
--------
<a class="modal" href="#mydiv">
</a>
<div style="display:none">
<div id="mydiv">
</div>
</div>
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm fairly new to dev work and i've run into an issue. supporting an app and they want to do masking on the input for a phone number. They want to have the input be that you can only enter a phone number in a xxx-xxx-xxxx format. Currently we are checking input, but only when we write to the DB.
The app has no masking built into it and is using AngularJS 1.4.9. I was able to locate something at the below URL however I'm having issues with it not working. I can call mask in my html template but it doesn't seem to do anything.
Does anyone have any suggestions or something that is easy to implement? I don't want to re-write a ton of the app. Right now we do the validation on the write to the DB, which can be annoying as you dont get the error till you hit save and then you lost all the data you put into the form.
I'm also very new to Angular, sorry for any misunderstandings i might have.
https://github.com/candreoliveira/ngMask
You can do that without installing any new dependencies using ng-pattern,
running link
<ng-form name="myForm" ng-controller="mainCtrl">
<div>Phone No. :</div>
<div>
<input type="text" placeholder="913-636-7865" name="phone" ng-pattern="phoneNumbr" ng-model="phone" />
<span class="error" ng-show="myForm.phone.$error.required">Required!</span>
<span class="error" ng-show="myForm.phone.$error.minlength">Phone no not less that 10 char.</span>
<span class="error" ng-show="myForm.phone.$error.maxlength">Phone no not more than 11 char.</span>
<br><span class="error" ng-show="myForm.phone.$error.pattern">Please match pattern [913-636-7865]</span>
</div>
Using ng-mask is a good option , but make sure you have it installed and added to your dependency list
angular.module('yourApp', ['ngMask']);
here what should your html look like :
<div class="row">
<div class="col-md-6">
<label>Phone number (Home)</label>
<input type="tel"
name="phone"
mask="999-999-9999"
ng-model="phone"/>
</div>
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
How to store fa-icons values in checkbox in MySQL using CodeIgniter.
<form method="post" action="/action_page.php">
<div>
<input type="checkbox" id="fa-icon" name="icon" value="cat">
</div>
<div>
<button type="submit">submitt</button>
</div>
</form>
In this example, we've got a name of icon, and a value of cat. When the form is submitted, the data name/value pair will be icon=cat.
If the value attribute was omitted, the default value for the checkbox is on , so the submitted data in that case would be animal=on.
<i class="icon-<?= $this->input->post('icon'); ?>"></i> <img src="cat-<?= $this->input->post('icon'); ?>.jpg" height="42" width="42">
will give you "cat -image or cat-icon"
By using name attribute
The name attribute specifies the name of an element. The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted. Note: Only form elements with a name attribute will have their values passed when submitting a form.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Below I have function called setProject() inside this function I have to send Id but value is not binding.
<tr ng-repeat="Project in Projects">
<td>
<div>
<input type="radio" ng-click="setProject({{Project.Id}})"/> {{Project.Nm}}
</div>
</td>
</tr>
When using ng-click you don't need to interpolate { }:
Change this:
ng-click="setProject({{Project.Id}})"
To this:
ng-click="setProject(Project.Id)"
The ng-click directive is already away of the Angular context in this case. It takes an Angular Expression as input.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have an array like var names=["price","quality","service"], I have to convert that array to object like names=[{"name":"price", "value":"1.3"},{"name":"quality","value":"3"},{"name":"service","value":"3.4"}]. Each and every time array values are different. I need to do build the input field with that values by using ng-repeat like
<div ng-repeat="n in names">
<input name="rating" ng-model="n" value="0"/>
</div>
How I can fetch the values as objects when user submits the form. can any one help me.
Update
I need json as like this:::
names=[{"name":"price", "value":"1.3"},{"name":"quality","value":"3"},{"name":"service","value":"3.4"}]
ThanQ!
Declare you model object
$scope.item={};
Then just do
<div ng-repeat="n in names">
<input name="rating" ng-model="item[n]" value="0"/>
</div>
The data will be collected into item object.
Update: To get such in such a model, we would have to create it before binding it to view. Assuming names has all the items in the controller do:
var items=names.map(function(name){ return { name:name,value:null}; })
This creates an array of the format you require.
Now bind the view to:
<div ng-repeat="item in items">
<input name="rating" ng-model="item.value" value="0"/>
</div>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I'm trying to print html output with tabset attribute but nothing is displaying. Apart from this other html is working fine:
<tabset> <tab heading="Canada"></tab> <tab heading="International"> </tab> <tab heading="U.S."> </tab> </tabset>
<div ng-bind-html-unsafe="properties.value"></div>
Please suggest.
ng-bind-html-unsafe has been removed recently (5 months) from Angular.
See this:
Changes:
remove ng-bind-html-unsafe
ng-bind-html is now in core
ng-bind-html is secure
supports SCE - so you can bind to an arbitrary trusted string
automatic sanitization if $sanitize is available
Use ng-bind-html instead.