TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Harshida Parmar
NA
36
393
Dynamically Generate HTML Div’s and Insert Data into DB
Jan 22 2020 2:53 PM
I have image when i click on it the value is store in x and y variable using jquery also the image part name like x=120 y =230 Name=Tea Cup
var
x = event.pageX;
var
y = event.pageY;
I can click on the image any number of time and fill the X,y, and Name value
$(
"#textboxX"
).append(
'<div><input type="text" value="'
+ x +
'" id="txtX" name="txtX"/></div>'
);
$(
"#textboxY"
).append(
'<div><input type="text" value="'
+ y +
'" id="txtY" name="txtY"/></div>'
);
$(
"#textboxBPart"
).append(
"<div><input type='text' id='txtName' name='txtName'/></div>"
);
var
$r = $(
'<button />'
,
{
type:
'button'
, text:
'Add Data to Div'
, id:
'btn_addToDiv'
});
var
$cancle = $(
'<button />'
,
{
type:
'button'
, text:
'Cancle'
, id:
'btn_cancle'
});
var
$DBInsert = $(
'<button />'
,
{
type:
'button'
, text:
'Add Data to Database'
, id:
'btn_addToDB'
});
$(
"#divSaveDynamicDis"
).append($r);
$(
"#divSaveDynamicDis"
).append($cancle);
Now this value get appended to div
var
NewData =
'<div class="col-sm-12">'
+ x +
' '
+ y +
' '
+ txtName.value +
' <a href="javascript:void(0);" class="remCF" data-marker="m_'
+ x +
'_'
+ y +
'">Remove</a> </div>'
;
$(
"#<%= divdynamicData.ClientID %>"
).append(NewData);
i want to insert this 5 10 15 50 DIV records to database using the button name btn_addToDB. What i suppose to do now need suggestion need help
Reply
Answers (
2
)
How to hide value on pie chart
Json crud operation